getHoverColor method Null safety
- MaterialButton button
The fill color of the button when it has input focus.
Returns the button's MaterialButton.focusColor if it is non-null. Otherwise the focus color depends on getTextTheme:
- ButtonTextTheme.normal, ButtonTextTheme.accent,
ButtonTextTheme.primary: returns the value of the
focusColor
constructor parameter if it is non-null, otherwise the value of getTextColor with opacity 0.04.
Implementation
Color getHoverColor(MaterialButton button) {
return button.hoverColor ?? _hoverColor ?? getTextColor(button).withOpacity(0.04);
}