NumberField constructor

const NumberField({
  1. Key? key,
  2. required TextEditingController controller,
  3. required StateProvider stateProvider,
  4. required String? validator(
    1. String?
    ),
  5. required TextInputFormatter inputFormatter,
  6. num? min,
  7. num? max,
  8. String label = '',
  9. String tooltip = '',
  10. bool enabled = true,
  11. int maxWidth = 5,
  12. int decimalPlaces = 0,
  13. num interval = 1,
  14. Future<void> onValueChanged(
    1. String? newValue
    )?,
})

Implementation

const NumberField({
  super.key,
  required this.controller,
  required this.stateProvider,
  required this.validator,
  required this.inputFormatter,
  this.min,
  this.max,
  this.label = '',
  this.tooltip = '',
  this.enabled = true,
  this.maxWidth = 5,
  this.decimalPlaces = 0,
  this.interval = 1, // Default interval is 1, can be set as double or int

  // Optional parameter for onValueChanged callback.

  this.onValueChanged,
});