Skip to content

Commit b899bf7

Browse files
authored
Putting changes back that were reverted accidentally. (#153)
1 parent caf7886 commit b899bf7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docs/resources/control-flow/functions/action-triggers.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Here’s an example of showing a message on button click using the **On Tap** tr
5959

6060
### Widget Specific Triggers
6161

62-
Widget specific triggers are available on certain widgets. Here are they:
62+
Certain widgets offer specific triggers that activate based on user interactions or device events. These triggers enable developers to define custom behaviors for various situations. Below are examples of widget-specific triggers:
6363

6464
- **On Submit**: Triggered on the TextField widget when the user presses "submit" or "done," finalizing text entry.
6565
- **On Page Load**: Available on the page widget, this trigger activates as soon as the page loads, useful for tasks like data fetching or content updates.
@@ -84,9 +84,10 @@ The lifecycle of gesture triggers involves four key stages: **Start**, **Update*
8484

8585
Tap gestures have a simpler lifecycle, focusing primarily on detecting taps and whether they complete or get canceled. Here's how the tap lifecycle works:
8686

87-
1. **Start**: This stage begins when the user places their finger on the screen to initiate a tap. For example: `onTapDown` is triggered when the user touches the screen to start a tap.
88-
2. **End/Stop**: The tap gesture is completed when the user lifts their finger from the screen. For example: `onTapUp` is triggered when the user completes the tap by lifting their finger.
89-
3. **Cancel**: If the user moves their finger too much before lifting it, the tap is canceled, preventing the completion of the action. For example: `onTapCancel` is triggered when a tap gesture is canceled.
87+
1. **Down**: This stage begins when the user places their finger on the screen to initiate a tap. For example: `onTapDown` is triggered when the user touches the screen to start a tap.
88+
2. **Up**: The tap gesture is completed when the user lifts their finger from the screen. For example: `onTapUp` is triggered when the user completes the tap by lifting their finger.
89+
3. **Tap**: After both of the above actions are successfully completed, `onTap` is triggered indicating a full tap gesture has occurred.
90+
3. **Cancel**: If the user moves their finger too much before lifting it, the tap is canceled, preventing the completion of the action. For example: `onTapCancel` will be called, and `onTap` will not be triggered.
9091

9192
Here’s how the lifecycle flows for tap gestures:
9293

@@ -188,8 +189,8 @@ You can access the Gesture Detector data after adding the relevant gesture detec
188189

189190
- **Global Position X**: The x-coordinate of the pointer relative to the left edge of the screen when the gesture was triggered.
190191
- **Global Position Y**: The y-coordinate of the pointer relative to the top edge of the screen when the gesture was triggered.
191-
- **Local Position X**: The x-coordinate of the pointer relative to the left edge of the widget that detected the gesture.
192-
- **Local Position Y**: The y-coordinate of the pointer relative to the top edge of the widget that detected the gesture.
192+
- **Local Position X**: The x-coordinate of the pointer relative to the left edge of the widget that has the action triggers applied.
193+
- **Local Position Y**: The y-coordinate of the pointer relative to the top edge of the widget that has the action triggers applied.
193194
- **Delta X**: The horizontal distance the pointer moved during the gesture.
194195
- **Delta Y**: The vertical distance the pointer moved during the gesture.
195196

Binary file not shown.

0 commit comments

Comments
 (0)