SwipeButton constructor

const SwipeButton({
  1. Key? key,
  2. required Widget child,
  3. Widget? thumb,
  4. Color? activeThumbColor,
  5. Color? inactiveThumbColor,
  6. EdgeInsets thumbPadding = EdgeInsets.zero,
  7. Color? activeTrackColor,
  8. Color? inactiveTrackColor,
  9. EdgeInsets trackPadding = EdgeInsets.zero,
  10. BorderRadius? borderRadius,
  11. double width = double.infinity,
  12. double height = 50,
  13. bool enabled = true,
  14. double elevationThumb = 0,
  15. double elevationTrack = 0,
  16. VoidCallback? onSwipeStart,
  17. VoidCallback? onSwipe,
  18. VoidCallback? onSwipeEnd,
  19. Duration duration = const Duration(milliseconds: 250),
})

Implementation

const SwipeButton({
  Key? key,
  required this.child,
  this.thumb,
  this.activeThumbColor,
  this.inactiveThumbColor,
  this.thumbPadding = EdgeInsets.zero,
  this.activeTrackColor,
  this.inactiveTrackColor,
  this.trackPadding = EdgeInsets.zero,
  this.borderRadius,
  this.width = double.infinity,
  this.height = 50,
  this.enabled = true,
  this.elevationThumb = 0,
  this.elevationTrack = 0,
  this.onSwipeStart,
  this.onSwipe,
  this.onSwipeEnd,
  this.duration = const Duration(milliseconds: 250),
})  : assert(elevationThumb >= 0.0),
      assert(elevationTrack >= 0.0),
      _swipeButtonType = _SwipeButtonType.swipe,
      super(key: key);