TextInputModel constructor

TextInputModel({
  1. String prompt = '> ',
  2. String placeholder = '',
  3. EchoMode echoMode = EchoMode.normal,
  4. String echoCharacter = '*',
  5. int charLimit = 0,
  6. int width = 0,
  7. bool showSuggestions = false,
  8. bool useVirtualCursor = true,
  9. TextInputKeyMap? keyMap,
  10. CursorModel? cursor,
  11. ValidateFunc? validate,
  12. TextInputStyles? styles,
})

Creates a new text input model.

Implementation

TextInputModel({
  this.prompt = '> ',
  this.placeholder = '',
  this.echoMode = EchoMode.normal,
  this.echoCharacter = '*',
  this.charLimit = 0,
  this.width = 0,
  this.showSuggestions = false,
  this.useVirtualCursor = true,
  TextInputKeyMap? keyMap,
  CursorModel? cursor,
  this.validate,
  TextInputStyles? styles,
}) : keyMap = keyMap ?? TextInputKeyMap(),
     cursor = cursor ?? CursorModel(),
     styles = styles ?? defaultTextInputStyles() {
  _updateVirtualCursorStyle();
}