ExSwipe constructor

const ExSwipe({
  1. required Widget child,
  2. Key? key,
  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 ExSwipe({
  required this.child,
  super.key,
  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',
      );