m3eStatesForInteraction function

Set<WidgetState> m3eStatesForInteraction(
  1. M3EInteractionState state, {
  2. bool enabled = true,
})

Implementation

Set<WidgetState> m3eStatesForInteraction(
  M3EInteractionState state, {
  bool enabled = true,
}) {
  return <WidgetState>{
    if (!enabled) WidgetState.disabled,
    if (state.hovered) WidgetState.hovered,
    if (state.focused) WidgetState.focused,
    if (state.pressed) WidgetState.pressed,
    if (state.dragged) WidgetState.dragged,
  };
}