},

),

),

onPressed:

()

},

child:

Text

'TextButton'

A color MaterialStateProperty only needs to return a value for the
colors whose default should be overridden. If it returns null, the
widget’s default will be used instead. For example, to just override
the text button’s focus overlay color:

TextButton

style:

ButtonStyle

overlayColor:

MaterialStateProperty

resolveWith

Color

>(

Set

MaterialState

states

if

states

contains

MaterialState

focused

))

return

Colors

red