getBrightness method

Brightness getBrightness(
  1. MaterialButton button
)

The button's overall brightness.

Returns the button's MaterialButton.colorBrightness if it is non-null, otherwise the color scheme's ColorScheme.brightness is returned.

Implementation

Brightness getBrightness(MaterialButton button) {
  return button.colorBrightness ?? colorScheme!.brightness;
}