red

// foreground

onPressed:

()

},

child:

Text

'FlatButton with custom foreground/background'

),

TextButton

style:

TextButton

styleFrom

primary:

Colors

red

// foreground

),

onPressed:

()

},

child:

Text

'TextButton with custom foreground'

),

In this case the TextButton’s foreground (text/icon) color as well as
its hovered/focused/pressed overlay colors will be based on
Colors.red. By default, the TextButton’s background fill color is
transparent.