DDSSwipeButton constructor

const DDSSwipeButton({
  1. Key? key,
  2. required String buttonLabel,
  3. VoidCallback? onSwipe,
  4. Color backgroundColor = ThemeColors.primary,
  5. Color thumbColor = Colors.white,
  6. Color disabledThumbColor = Colors.white,
  7. Color disabledTrackColor = Colors.grey,
  8. double dismissThreshold = 0.9,
  9. double height = 70,
  10. double width = double.infinity,
  11. double maxWidth = 300,
  12. bool isBidirectional = false,
  13. bool isDisabled = false,
  14. Widget? thumbIcon,
  15. TextStyle? labelStyle,
  16. DDSSwipeStartPosition swipeStartPosition = DDSSwipeStartPosition.left,
  17. double? borderRadius,
  18. DDSSwipeButtonShape buttonShape = DDSSwipeButtonShape.pilled,
  19. bool labelAnimation = true,
  20. Color? labelAnimationColor,
  21. double labelPadding = 0,
  22. double? thumbSize,
  23. 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);