QuantityInput constructor
QuantityInput({
- required dynamic value,
- required dynamic onChanged(),
- dynamic step = 1,
- int decimalDigits = 1,
- Color? buttonColor,
- Color? iconColor,
- String label = '',
- bool readOnly = false,
- bool acceptsNegatives = false,
- bool acceptsZero = false,
- dynamic minValue = 1,
- dynamic maxValue = 100000,
- QuantityInputType? type = QuantityInputType.int,
- double inputWidth = 80,
- InputDecoration? decoration,
- double elevation = 5,
Creates a widget that can be used to manage number inputs
Widget can manage integer or double values
Implementation
QuantityInput({
required this.value,
required this.onChanged,
this.step = 1,
this.decimalDigits = 1,
this.buttonColor,
this.iconColor,
this.label = '',
this.readOnly = false,
this.acceptsNegatives = false,
this.acceptsZero = false,
this.minValue = 1,
this.maxValue = 100000,
this.type = QuantityInputType.int,
this.inputWidth = 80,
this.decoration,
this.elevation = 5
})
: assert(decimalDigits > 0, 'Decimal digits cannot be set to zero or negative value'),
assert(!(acceptsZero && acceptsNegatives), 'acceptsZero and acceptsNegatives cannot be simultaneously true');