From 5050e2c2bb7cad5ac8fcce031ff99fcadacdc935 Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Mon, 13 Feb 2023 17:06:56 +0100 Subject: [PATCH] feat(ui_component): add tapped control state --- .../wyatt_ui_components/lib/src/core/enums/control_state.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/wyatt_ui_components/lib/src/core/enums/control_state.dart b/packages/wyatt_ui_components/lib/src/core/enums/control_state.dart index ce66679a..a3c36727 100644 --- a/packages/wyatt_ui_components/lib/src/core/enums/control_state.dart +++ b/packages/wyatt_ui_components/lib/src/core/enums/control_state.dart @@ -24,6 +24,9 @@ enum ControlState { /// When the mouse cursor is hover the control hovered, + /// When the control is clicked + tapped, + /// When the control is focused (like pressing tab) focused, @@ -36,6 +39,7 @@ enum ControlState { bool isDisabled() => this == ControlState.disabled; bool isEnabled() => this != ControlState.disabled; bool isHovered() => this == ControlState.hovered; + bool isTapped() => this == ControlState.tapped; bool isFocused() => this == ControlState.focused; bool isSelected() => this == ControlState.selected; bool isInvalid() => this == ControlState.invalid;