SwipeButton constructor
const
SwipeButton({
- Key? key,
- required Widget child,
- Widget? thumb,
- Color? activeThumbColor,
- Color? inactiveThumbColor,
- EdgeInsets thumbPadding = EdgeInsets.zero,
- Color? activeTrackColor,
- Color? inactiveTrackColor,
- EdgeInsets trackPadding = EdgeInsets.zero,
- BorderRadius? borderRadius,
- double width = double.infinity,
- double height = 50,
- bool enabled = true,
- double elevationThumb = 0,
- double elevationTrack = 0,
- VoidCallback? onSwipeStart,
- VoidCallback? onSwipe,
- VoidCallback? onSwipeEnd,
- 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);