DDSSwipeButton constructor
const
DDSSwipeButton({
- Key? key,
- required String buttonLabel,
- VoidCallback? onSwipe,
- Color backgroundColor = ThemeColors.primary,
- Color thumbColor = Colors.white,
- Color disabledThumbColor = Colors.white,
- Color disabledTrackColor = Colors.grey,
- double dismissThreshold = 0.9,
- double height = 70,
- double width = double.infinity,
- double maxWidth = 300,
- bool isBidirectional = false,
- bool isDisabled = false,
- Widget? thumbIcon,
- TextStyle? labelStyle,
- DDSSwipeStartPosition swipeStartPosition = DDSSwipeStartPosition.left,
- double? borderRadius,
- DDSSwipeButtonShape buttonShape = DDSSwipeButtonShape.pilled,
- bool labelAnimation = true,
- Color? labelAnimationColor,
- double labelPadding = 0,
- double? thumbSize,
- double? horizontalPadding,
Implementation
const DDSSwipeButton({
Key? key,
required this.buttonLabel,
this.onSwipe,
this.backgroundColor = ThemeColors.primary,
this.thumbColor = Colors.white,
this.disabledThumbColor = Colors.white,
this.disabledTrackColor = Colors.grey,
this.dismissThreshold = 0.9,
this.height = 70,
this.width = double.infinity,
this.maxWidth = 300,
this.isBidirectional = false,
this.isDisabled = false,
this.thumbIcon,
this.labelStyle,
this.swipeStartPosition = DDSSwipeStartPosition.left,
this.borderRadius,
this.buttonShape = DDSSwipeButtonShape.pilled,
this.labelAnimation = true,
this.labelAnimationColor,
this.labelPadding = 0,
this.thumbSize,
this.horizontalPadding,
}) : super(key: key);