null

child:

Text

'RaisedButton with custom disabled colors'

),

ElevatedButton

style:

ButtonStyle

backgroundColor:

MaterialStateProperty

resolveWith

Color

>(

Set

MaterialState

states

if

states

contains

MaterialState

disabled

))

return

Colors

red

return

null

// Defer to the widget's default.

}),

foregroundColor:

MaterialStateProperty

resolveWith

Color

>(

Set