InlineSuggestionController class
Controller for inline suggestions (ghost text)
- Inheritance
-
- Object
- ChangeNotifier
- InlineSuggestionController
Constructors
- InlineSuggestionController({LogicalKeyboardKey acceptKey = LogicalKeyboardKey.tab, LogicalKeyboardKey partialAcceptKey = LogicalKeyboardKey.arrowRight, LogicalKeyboardKey dismissKey = LogicalKeyboardKey.escape, bool caseSensitive = false})
Properties
- acceptKey → LogicalKeyboardKey
-
Key to accept the entire suggestion
final
- caseSensitive → bool
-
Whether matching should be case-sensitive
final
- currentText → String
-
The current text in the input field
no setter
- dismissKey → LogicalKeyboardKey
-
Key to dismiss the suggestion
final
- ghostText → String
-
The ghost text (part of suggestion not yet typed)
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isVisible → bool
-
Whether the ghost text is visible
no setter
- partialAcceptKey → LogicalKeyboardKey
-
Key to accept one word of the suggestion
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- suggestion → String
-
The full suggestion text
no setter
Methods
-
acceptFull(
) → String - Accept the full suggestion
-
acceptWord(
) → String - Accept one word of the suggestion
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clear(
) → void - Clear the current suggestion
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
handleKeyEvent(
KeyEvent event) → KeyEventResult - Handle keyboard input
-
hide(
) → void - Hide the ghost text
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setSuggestion(
String suggestion) → void - Set a new suggestion
-
show(
) → void - Show the ghost text
-
toString(
) → String -
A string representation of this object.
inherited
-
updateText(
String text) → void - Update the current text and recalculate ghost text
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited