backgroundColor static method

Color backgroundColor(
  1. FluentThemeData theme,
  2. Set<ButtonStates> states
)

Implementation

static Color backgroundColor(
  FluentThemeData theme,
  Set<ButtonStates> states,
) {
  if (states.isDisabled) {
    return theme.resources.accentFillColorDisabled;
  } else if (states.isPressing) {
    return theme.accentColor.tertiaryBrushFor(theme.brightness);
  } else if (states.isHovering) {
    return theme.accentColor.secondaryBrushFor(theme.brightness);
  } else {
    return theme.accentColor.defaultBrushFor(theme.brightness);
  }
}