TextEditingController class

Controls the state of a TextField.

Whenever the user modifies a text field with an associated TextEditingController, the text field updates model and the controller notifies its listeners.

Inheritance
Implemented types

Constructors

TextEditingController({String? text, TextInputModel? model})

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
model TextInputModel
The current TextInputModel managed by this controller.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection TextSelection
The current selection.
getter/setter pair
text String
The current text being edited.
getter/setter pair
value TextEditingValue
The current value held by this object.
getter/setter pairoverride-getter

Methods

addListener(void listener()) → void
Register listener to be called when the object notifies.
inherited
clear() → void
Clears the text.
dispose() → void
Releases all listeners. After this call the notifier should not be used.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Notify all registered listeners.
inherited
removeListener(void listener()) → void
Remove a previously registered listener.
inherited
selectAll() → void
Selects all text.
throwIfDisposed() → void
Throws StateError if this notifier has already been disposed.
inherited
toString() String
A string representation of this object.
inherited
update(Msg msg) Cmd?
Updates the model using the provided msg.

Operators

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