RestorableTextEditingController class Null safety

A RestorableProperty that knows how to store and restore a TextEditingController.

The TextEditingController is accessible via the value getter. During state restoration, the property will restore TextEditingController.text to the value it had when the restoration data it is getting restored from was collected.



RestorableTextEditingController({String? text})
Creates a RestorableTextEditingController.
RestorableTextEditingController.fromValue(TextEditingValue value)
Creates a RestorableTextEditingController from an initial TextEditingValue.


enabled bool
Whether the object currently returned by toPrimitives should be included in the restoration state.
read-only, inherited
hashCode int
The hash code for this object.
read-only, inherited
hasListeners bool
Whether any listeners are currently registered.
@protected, read-only, inherited
isRegistered bool
Whether this property is currently registered with a RestorationMixin.
@protected, read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
state State<StatefulWidget>
The State object that this property is registered with.
@protected, read-only, inherited
value TextEditingController
The Listenable stored in this property.
read-only, inherited


addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
createDefaultValue() TextEditingController
Called by the RestorationMixin if no restoration data is available to restore the value of the property from to obtain the default value for the property.
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).
fromPrimitives(Object? data) TextEditingController
Called by the RestorationMixin to convert the data previously retrieved from toPrimitives back into an object of type T that this property should wrap.
initWithValue(TextEditingController value) → void
Called by the RestorationMixin with the value returned by either createDefaultValue or fromPrimitives to set the value that this property currently wraps.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
notifyListeners() → void
Call all the registered listeners.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
toPrimitives() Object
Called by the RestorationMixin to retrieve the information that this property wants to store in the restoration data.
toString() String
A string representation of this object.


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