NumberField constructor
const
NumberField({ - Key? key,
- required TextEditingController controller,
- required StateProvider stateProvider,
- required String? validator(
- String?
),
- required TextInputFormatter inputFormatter,
- num? min,
- num? max,
- String label = '',
- String tooltip = '',
- bool enabled = true,
- int maxWidth = 5,
- int decimalPlaces = 0,
- num interval = 1,
- Future<void> onValueChanged(
- 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,
});