SuggestModel constructor

SuggestModel({
  1. String prompt = '? ',
  2. List<String> options = const [],
  3. String placeholder = '',
  4. String defaultValue = '',
  5. int scroll = 5,
  6. String hint = '',
  7. bool showHelp = true,
  8. SuggestKeyMap? keyMap,
  9. SuggestStyles? styles,
})

Creates a new suggest model.

Implementation

SuggestModel({
  this.prompt = '? ',
  this.options = const [],
  this.placeholder = '',
  this.defaultValue = '',
  this.scroll = 5,
  this.hint = '',
  this.showHelp = true,
  SuggestKeyMap? keyMap,
  SuggestStyles? styles,
}) : keyMap = keyMap ?? SuggestKeyMap(),
     styles = styles ?? SuggestStyles(),
     _rawInput = defaultValue,
     _cursor = defaultValue.length;