uncheckedInputColor static method

Color uncheckedInputColor(
  1. FluentThemeData theme,
  2. Set<ButtonStates> states, {
  3. bool transparentWhenNone = false,
  4. bool transparentWhenDisabled = false,
})

Implementation

static Color uncheckedInputColor(
  FluentThemeData theme,
  Set<ButtonStates> states, {
  bool transparentWhenNone = false,
  bool transparentWhenDisabled = false,
}) {
  final res = theme.resources;
  if (states.isDisabled) {
    if (transparentWhenDisabled) return res.subtleFillColorTransparent;
    return res.controlAltFillColorDisabled;
  }
  if (states.isPressing) return res.subtleFillColorTertiary;
  if (states.isHovering) return res.subtleFillColorSecondary;
  return transparentWhenNone
      ? res.subtleFillColorTransparent
      : res.controlAltFillColorSecondary;
}