overlayColor property Null safety

MaterialStateProperty<Color?>? overlayColor
final

Defines the ink response focus, hover, and splash colors.

If non-null, it is resolved against one of MaterialState.focused, MaterialState.hovered, and MaterialState.pressed.

MaterialState.pressed triggers a ripple (an ink splash), per the current Material Design spec. The overlayColor doesn't map a state to InkResponse.highlightColor because a separate highlight is not used by the current design guidelines. See https://material.io/design/interaction/states.html#pressed

If the overlay color is null or resolves to null, then the default values for InkResponse.focusColor, InkResponse.hoverColor, InkResponse.splashColor will be used instead.

Implementation

final MaterialStateProperty<Color?>? overlayColor;