SwipeableStack<D extends SwipeableStackIdentifiable> constructor
SwipeableStack<D extends SwipeableStackIdentifiable> ({
- SwipeableStackController<
D> ? controller, - required List<
D> dataSet, - required SwipeableStackItemBuilder<
D> builder, - SwipeableStackOverlayBuilder<
D> ? overlayBuilder, - SwipeCompletionCallback<
D> ? onSwipeCompleted, - OnWillMoveNext<
D> ? onWillMoveNext, - double horizontalSwipeThreshold = 0.44,
- double verticalSwipeThreshold = 0.32,
- Duration swipeAssistDuration = const Duration(milliseconds: 650),
- double viewFraction = 0.92,
- Clip stackClipBehaviour = Clip.hardEdge,
- Key? key,
Implementation
SwipeableStack({
SwipeableStackController<D>? controller,
required this.dataSet,
required this.builder,
this.overlayBuilder,
this.onSwipeCompleted,
this.onWillMoveNext,
this.horizontalSwipeThreshold = 0.44,
this.verticalSwipeThreshold = 0.32,
this.swipeAssistDuration = const Duration(milliseconds: 650),
this.viewFraction = 0.92,
this.stackClipBehaviour = Clip.hardEdge,
Key? key,
}) : controller = controller ?? SwipeableStackController<D>(),
assert(0 <= viewFraction && viewFraction <= 1),
assert(0 <= horizontalSwipeThreshold && horizontalSwipeThreshold <= 1),
assert(0 <= verticalSwipeThreshold && verticalSwipeThreshold <= 1),
super(key: key);