IncrementDecrementWidget constructor

const IncrementDecrementWidget({
  1. Key? key,
  2. required int quantity,
  3. int? maxQuantity,
  4. int? minValue,
  5. ValueUpdate? onChanged,
  6. Color? backgroundColor,
  7. Color? iconColor,
  8. double? elevation,
  9. EdgeInsetsGeometry? margin,
  10. EdgeInsetsGeometry? valuePadding,
  11. TextStyle? quantityTextStyle,
  12. double? borderRadius,
  13. double? width,
  14. double? height,
  15. EdgeInsetsGeometry? buttonPadding,
  16. EdgeInsetsGeometry? buttonMargin,
  17. double? buttonWidth,
  18. double? buttonHeight,
  19. Color? splashColor,
  20. Color? borderColor,
  21. InteractiveInkFeatureFactory? splashFactory,
  22. Widget? incrementIcon,
  23. Widget? decrementIcon,
  24. OutlinedBorder? buttonShape,
  25. Duration longPressInterval = const Duration(milliseconds: 100),
  26. MainAxisAlignment? alignment,
})

Creates an IncrementDecrementWidget with the specified properties.

The quantity parameter is required and sets the initial value.

Implementation

const IncrementDecrementWidget({
  super.key,
  required this.quantity,
  this.maxQuantity,
  this.minValue,
  this.onChanged,
  this.backgroundColor,
  this.iconColor,
  this.elevation,
  this.margin,
  this.valuePadding,
  this.quantityTextStyle,
  this.borderRadius,
  this.width,
  this.height,
  this.buttonPadding,
  this.buttonMargin,
  this.buttonWidth,
  this.buttonHeight,
  this.splashColor,
  this.borderColor,
  this.splashFactory,
  this.incrementIcon,
  this.decrementIcon,
  this.buttonShape,
  this.longPressInterval = const Duration(milliseconds: 100),
  this.alignment,
});