QuantityInput constructor

QuantityInput({
  1. required dynamic value,
  2. required dynamic onChanged(
    1. String
    ),
  3. dynamic step = 1,
  4. int decimalDigits = 1,
  5. Color? buttonColor,
  6. Color? iconColor,
  7. String label = '',
  8. bool readOnly = false,
  9. bool acceptsNegatives = false,
  10. bool acceptsZero = false,
  11. dynamic minValue = 1,
  12. dynamic maxValue = 100000,
  13. QuantityInputType? type = QuantityInputType.int,
  14. double inputWidth = 80,
  15. InputDecoration? decoration,
  16. 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');