NumberInputModel constructor

NumberInputModel({
  1. String prompt = '? ',
  2. String placeholder = '',
  3. num? defaultValue,
  4. num? min,
  5. num? max,
  6. num step = 1,
  7. String hint = '',
  8. bool showHelp = true,
  9. NumberInputKeyMap? keyMap,
  10. NumberInputStyles? styles,
  11. String? validate(
    1. num
    )?,
})

Creates a new number-input model.

Implementation

NumberInputModel({
  this.prompt = '? ',
  this.placeholder = '',
  num? defaultValue,
  this.min,
  this.max,
  this.step = 1,
  this.hint = '',
  this.showHelp = true,
  NumberInputKeyMap? keyMap,
  NumberInputStyles? styles,
  this.validate,
}) : keyMap = keyMap ?? NumberInputKeyMap(),
     styles = styles ?? NumberInputStyles(),
     _rawInput = defaultValue != null ? _formatNum(defaultValue) : '';