AnticipateModel class

Anticipate model for autocomplete input.

Inheritance

Constructors

AnticipateModel({String prompt = '? ', String placeholder = '', List<String> suggestions = const [], String defaultValue = '', AnticipateConfig config = const AnticipateConfig(), AnticipateKeyMap? keyMap, Style? promptStyle, Style? textStyle, Style? placeholderStyle, Style? suggestionStyle, Style? selectedSuggestionStyle})
Creates a new anticipate model.

Properties

config → AnticipateConfig
Configuration for behavior.
final
defaultValue → String
Default value if no input provided.
final
filteredSuggestions → List<String>
Gets filtered suggestions based on current input.
no setter
focused → bool
Whether the anticipate is focused.
no setter
hashCode → int
The hash code for this object.
no setterinherited
keyMap → AnticipateKeyMap
Key bindings.
final
placeholder → String
Placeholder text when empty.
final
prompt → String
Prompt displayed before input.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedIndex → int
Gets the selected suggestion index.
no setter
selectedSuggestion → String
Gets the currently selected suggestion.
no setter
suggestions → List<String>
Available suggestions for autocomplete.
final
value ↔ String
Gets the current input value.
getter/setter pair

Methods

blur() → AnticipateModel
Removes focus.
copyWith({String? value, int? selectedIndex, bool? focused, List<String>? filteredSuggestions}) → AnticipateModel
Creates a copy with updated fields.
focus() → AnticipateModel
Sets focus state.
init() → Cmd?
Returns an optional command to execute on program startup.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → AnticipateModel
Resets the anticipate to initial state.
toString() → String
A string representation of this object.
inherited
update(Msg msg) → (AnticipateModel, Cmd?)
Updates the component state in response to a message.
override
view() → String
Renders the current model state for display.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited