return

Colors

red

return

null

// Defer to the widget's default.

),

),

onPressed:

()

},

child:

Text

'TextButton'

),

The styleFrom() ButtonStyle utility methods

The Material Design spec defines buttons’ foreground and overlay colors in
terms of the color scheme’s primary color. The primary color is
rendered at different opacities, depending on the button’s state. To
simplify creating a button style that includes all of the properties
that depend on color scheme colors, each button class includes a
static styleFrom() method which constructs a ButtonStyle from a simple
set of values, including the ColorScheme colors it depends on.