progress property
final
Returns a value between 0.0 and 1.0 representing how far along the back gesture is.
This value is driven by the horizontal location of the touch point, and should be used as the fraction to seek the predictive back animation with. Specifically,
- The progress is 0.0 when the touch is at the starting edge of the screen (left or right), and the animation should seek to its start state.
- The progress is approximately 1.0 when the touch is at the opposite side of the screen, and the animation should seek to its end state. Exact end value may vary depending on screen size.
When the gesture is canceled, the progress value continues to update, animating back to 0.0 until the cancellation animation completes.
In-between locations are linearly interpolated based on horizontal distance from the starting edge and smooth clamped to 1.0 when the distance exceeds a system-wide threshold.
Implementation
final double progress;