swipeDetectionBehavior property
Behavior used for swipe gesture detection.
By default, SwipeDetectionBehavior.singularOnEnd
is used, which runs callback after swipe is completed.
Use SwipeDetectionBehavior.continuous
for most reactive behavior but be careful with threshold values.
SwipeDetectionBehavior.singular
- Runs callback a single time - when swipe movement is above set threshold.SwipeDetectionBehavior.singularOnEnd
- Runs callback a single time - when swipe is fully completed.SwipeDetectionBehavior.continuous
- Runs callback multiple times - whenever swipe movement is above set threshold. Make sure to set threshold values higher than usual!SwipeDetectionBehavior.continuousDistinct
- Runs callback multiple times - whenever swipe movement is above set threshold, but only on distinctSwipeDirection
.
Implementation
final SwipeDetectionBehavior swipeDetectionBehavior;