ElegantNumberButton constructor

ElegantNumberButton({
  1. Key? key,
  2. required num initialValue,
  3. required num minValue,
  4. required num maxValue,
  5. required CounterChangeCallback onChanged,
  6. required int decimalPlaces,
  7. Color? color,
  8. TextStyle? textStyle,
  9. num step = 1,
  10. double buttonSizeWidth = 30,
  11. double buttonSizeHeight = 25,
})

Implementation

ElegantNumberButton({
  Key? key,
  required num initialValue,
  required this.minValue,
  required this.maxValue,
  required this.onChanged,
  required this.decimalPlaces,
  this.color,
  this.textStyle,
  this.step = 1,
  this.buttonSizeWidth = 30,
  this.buttonSizeHeight = 25,
})  : assert(maxValue > minValue),
      assert(initialValue >= minValue && initialValue <= maxValue),
      assert(step > 0),
      selectedValue = initialValue,
      super(key: key);