fluent2FillOn function

IconData fluent2FillOn(
  1. IconData icon,
  2. Set<WidgetState> states
)

icon as a control wears it in states: the filled design under the pointer and while pressed, as Fluent's bundled icons fill in; the regular one at rest and while disabled.

Implementation

IconData fluent2FillOn(IconData icon, Set<WidgetState> states) =>
    !states.contains(WidgetState.disabled) &&
        (states.contains(WidgetState.hovered) ||
            states.contains(WidgetState.pressed))
    ? fluent2Filled(icon)
    : icon;