getFocusColor method Null safety

Color getFocusColor(
  1. 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:

Implementation

Color getFocusColor(MaterialButton button) {
  return button.focusColor ?? _focusColor ?? getTextColor(button).withOpacity(0.12);
}