Skip to content

Commit fac794d

Browse files
committed
docs: convert state section to a table
1 parent aa5670a commit fac794d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,15 @@ CustomRefreshIndicator(
161161

162162
CustomRefreshIndicator manages various states to provide feedback on the refresh process. Understanding these states will help you customize the behavior and appearance of your refresh indicator.
163163

164-
- **idle**: The default state when no interaction is happening. The indicator is not visible, and the value is `0.0`.
165-
- **dragging**: The user is pulling down, but the pull distance hasn't reached the threshold to trigger a refresh. The value transitions from `0.0` to `1.0` as the user drags further down.
166-
- **armed**: The pull-down action has passed the threshold. If the user releases the scroll view now, the _onRefresh_ callback will be triggered. The value is at or above `1.0`.
167-
- **canceling**: The user stopped dragging before the threshold. The refresh operation is not triggered, and the indicator will shrink back to its initial state. The value animates back to `0.0`.
168-
- **loading**: The _onRefresh_ callback has been triggered, and the refresh operation is in progress. The value is steady at `1.0`, indicating an active refresh.
169-
- **complete**: Indicates that the refresh operation is finished successfully. This state is only enabled if a _completeDuration_ is provided via the _durations_ parameter. The indicator stays fully visible for the duration specified.
170-
- **finalizing**: The refresh operation is complete, and the indicator is animating away. The value animates from `1.0` back to `0.0`.
164+
| State | Value Range | Description |
165+
| ------------ | ---------------------- | --------------------------------------------------------------------------------------------- |
166+
| `idle` | `0.0` | The default state when no interaction is happening. The indicator is not visible. |
167+
| `dragging` | `0.0` to `1.0` | The user is pulling down, but hasn't yet reached the threshold to trigger a refresh. |
168+
| `armed` | At or above `1.0` | Pull-down has passed the threshold. Releasing now will trigger the _onRefresh_ callback. |
169+
| `canceling` | Animates back to `0.0` | Pull-down stopped before the threshold; no refresh is triggered, and the indicator retracts. |
170+
| `loading` | Steady at `1.0` | The _onRefresh_ callback is active, indicating an ongoing refresh operation. |
171+
| `complete` | Steady at `1.0` | Refresh is complete, and the indicator stays fully visible if _completeDuration_ is set. |
172+
| `finalizing` | `1.0` to `0.0` | The refresh operation has finished, and the indicator is animating back to its initial state. |
171173

172174
Each state transition provides an opportunity to animate or adjust the UI accordingly, giving users a seamless and interactive experience.
173175

0 commit comments

Comments
 (0)