SwipeTo constructor

const SwipeTo({
  1. Key? key,
  2. required Widget child,
  3. GestureDragUpdateCallback? onRightSwipe,
  4. GestureDragUpdateCallback? onLeftSwipe,
  5. IconData iconOnRightSwipe = Icons.reply,
  6. Widget? rightSwipeWidget,
  7. IconData iconOnLeftSwipe = Icons.reply,
  8. Widget? leftSwipeWidget,
  9. double iconSize = 26.0,
  10. Color? iconColor,
  11. Duration animationDuration = const Duration(milliseconds: 150),
  12. double offsetDx = 0.3,
  13. int swipeSensitivity = 5,
})

Implementation

const SwipeTo({
  Key? key,
  required this.child,
  this.onRightSwipe,
  this.onLeftSwipe,
  this.iconOnRightSwipe = Icons.reply,
  this.rightSwipeWidget,
  this.iconOnLeftSwipe = Icons.reply,
  this.leftSwipeWidget,
  this.iconSize = 26.0,
  this.iconColor,
  this.animationDuration = const Duration(milliseconds: 150),
  this.offsetDx = 0.3,
  this.swipeSensitivity = 5,
})  : assert(swipeSensitivity >= 5 && swipeSensitivity <= 35,
          "swipeSensitivity value must be between 5 to 35"),
      super(key: key);