return

Colors

blue

return

null

// Defer to the widget's default.

}),

),

onPressed:

()

},

child:

Text

'TextButton with custom overlay colors'

),

The new version is more flexible although less compact. In the
original version, the the precedence of the different states is
implicit (and undocumented) and fixed, in the new version, it’s
explicit.  For an app that specified these colors frequently, the
easiest migration path would be to define one or more ButtonStyles
that match the example above - and just use the style parameter - or
to define a stateless wrapper widget that encapsulated the three color
parameters.

Migrating buttons with custom disabled colors