InputNumber constructor
const
InputNumber({
- Key? id,
- required InputNumberState state,
- required String message,
- String? placeholder,
- num? min,
- num? max,
- num step = 1,
- bool allowDecimals = false,
- bool allowNegative = true,
- num? defaultValue,
- String? validate(
- num value
- void onSubmit(
- num value
- void onChanged(
- num? value
- bool lockOnSubmit = true,
- String askPrefix = '?',
- String errorPrefix = '✗',
- String successPrefix = '✓',
- Style? messageStyle,
- Style? inputStyle,
- Style? errorStyle,
- Style? askPrefixStyle,
- Style? errorPrefixStyle,
- Style? successPrefixStyle,
Implementation
const InputNumber({
Key? id,
required this.state,
required this.message,
this.placeholder,
this.min,
this.max,
this.step = 1,
this.allowDecimals = false,
this.allowNegative = true,
this.defaultValue,
this.validate,
this.onSubmit,
this.onChanged,
this.lockOnSubmit = true,
this.askPrefix = '?',
this.errorPrefix = '✗',
this.successPrefix = '✓',
this.messageStyle,
this.inputStyle,
this.errorStyle,
this.askPrefixStyle,
this.errorPrefixStyle,
this.successPrefixStyle,
}) : _id = id,
assert(step > 0, 'step must be > 0'),
assert(min == null || max == null || min <= max, 'min must be <= max');