IncrementDecrementWidget.flat constructor
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,
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,
);
}