SwipeableStack<D extends SwipeableStackIdentifiable> constructor

SwipeableStack<D extends SwipeableStackIdentifiable>({
  1. SwipeableStackController<D>? controller,
  2. required List<D> dataSet,
  3. required SwipeableStackItemBuilder<D> builder,
  4. SwipeableStackOverlayBuilder<D>? overlayBuilder,
  5. SwipeCompletionCallback<D>? onSwipeCompleted,
  6. OnWillMoveNext<D>? onWillMoveNext,
  7. double horizontalSwipeThreshold = 0.44,
  8. double verticalSwipeThreshold = 0.32,
  9. Duration swipeAssistDuration = const Duration(milliseconds: 650),
  10. double viewFraction = 0.92,
  11. Clip stackClipBehaviour = Clip.hardEdge,
  12. 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);