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,
- SwipeButtonShape shape = SwipeButtonShape.rectangle,
- 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),
- bool bidirectional = false,
- Widget? icon,
- Gradient? activeTrackGradient,
- Widget thumbBuilder(
- bool isSwiped
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.shape = SwipeButtonShape.rectangle,
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),
this.bidirectional = false,
this.icon,
this.activeTrackGradient,
this.thumbBuilder,
}) : assert(elevationThumb >= 0.0),
assert(elevationTrack >= 0.0),
super(key: key);