foregroundColor static method

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

Implementation

static Color foregroundColor(
    FluentThemeData theme, Set<ButtonStates> states) {
  final res = theme.resources;
  if (states.isPressing) {
    return res.textOnAccentFillColorSecondary;
  } else if (states.isHovering) {
    return res.textOnAccentFillColorPrimary;
  } else if (states.isDisabled) {
    return res.textOnAccentFillColorDisabled;
  }
  return res.textOnAccentFillColorPrimary;
}