IncrementDecrementWidget.flat constructor

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

Factory constructor for a flat design.

The flat design has no elevation and transparent background by default.

Implementation

factory IncrementDecrementWidget.flat({
  required int quantity,
  int? maxQuantity,
  int? minValue,
  ValueUpdate? onChanged,
  Color? backgroundColor,
  Color? iconColor,
  EdgeInsetsGeometry? margin,
  EdgeInsetsGeometry? valuePadding,
  EdgeInsetsGeometry? buttonMargin,
  EdgeInsetsGeometry? buttonPadding,
  TextStyle? quantityTextStyle,
  double? borderRadius,
  double? width,
  double? height,
  double? buttonWidth,
  double? buttonHeight,
  Color? splashColor,
  Color? borderColor,
  double borderWidth = 1.0,
  InteractiveInkFeatureFactory? splashFactory,
  Widget? incrementIcon,
  Widget? decrementIcon,
  Duration longPressInterval = const Duration(milliseconds: 100),
  MainAxisAlignment? alignment,
}) {
  return IncrementDecrementWidget(
    quantity: quantity,
    maxQuantity: maxQuantity,
    minValue: minValue,
    onChanged: onChanged,
    backgroundColor: backgroundColor ?? Colors.transparent,
    iconColor: iconColor,
    elevation: 0.0,
    margin: margin,
    valuePadding: valuePadding,
    buttonMargin: buttonMargin,
    buttonPadding: buttonPadding,
    quantityTextStyle: quantityTextStyle,
    borderRadius: borderRadius ?? 10.0,
    width: width,
    height: height,
    buttonWidth: buttonWidth,
    buttonHeight: buttonHeight,
    splashColor: splashColor,
    borderColor: borderColor,
    borderWidth: borderWidth,
    splashFactory: splashFactory,
    incrementIcon: incrementIcon,
    decrementIcon: decrementIcon,
    longPressInterval: longPressInterval,
    alignment: alignment,
  );
}