buttonForegroundColor static method

Color buttonForegroundColor(
  1. BuildContext context,
  2. Set<ButtonStates> states
)

Defines the default foregournd color used by Buttons using the current brightness and state.

Implementation

static Color buttonForegroundColor(
  BuildContext context,
  Set<ButtonStates> states,
) {
  final res = FluentTheme.of(context).resources;
  if (states.isPressing) {
    return res.textFillColorSecondary;
  } else if (states.isDisabled) {
    return res.textFillColorDisabled;
  }
  return res.textFillColorPrimary;
}