IncrementDecrementWidget.flat constructor

IncrementDecrementWidget.flat({
  1. required int quantity,
  2. required int maxQuantity,
  3. required int minValue,
  4. required void onIncrement(),
  5. required void onDecrement(),
  6. Color? backgroundColor,
  7. Color? iconColor,
})

Implementation

factory IncrementDecrementWidget.flat({
  required int quantity,
  required int maxQuantity,
  required int minValue,
  required void Function() onIncrement,
  required void Function() onDecrement,
  Color? backgroundColor,
  Color? iconColor,
}) {
  return IncrementDecrementWidget(
    quantity: quantity,
    maxQuantity: maxQuantity,
    minValue: minValue,
    onIncrement: onIncrement,
    onDecrement: onDecrement,
    backgroundColor: backgroundColor,
    iconColor: iconColor,
    elevation: 0.0,
    // Flat design, no elevation
    margin: const EdgeInsets.all(8.0),
  );
}