IncrementDecrementWidget.raised constructor

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

Factory constructor for a raised design.

The raised design has elevation and an optional background color.

Implementation

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