TextFieldController class
A controller for a single String field in a FormController.
See also:
- FieldController, which is generic controller that support any type.
- Inheritance
-
- Object
- ChangeNotifier
- FieldController<
String> - TextFieldController
Constructors
- TextFieldController.create(FormController parent, {required Object tag, bool autoValidate = false})
-
factory
Properties
- autoValidate → bool
-
Whether this field should be automatically validated.
finalinherited
- error → InputFieldError
-
The current error of this field.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isDirty → bool
-
Returns true if the field has been modified.
no setterinherited
- isIMEInput → bool
-
Returns true if the field has been modified by an Input Method.
no setter
- isSubmitted → bool
-
Returns true if the field has been submitted with setSubmitted.
no setterinherited
- parent → FormController
-
The parent FormController of this field.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag → Object
-
The tag of this field.
finalinherited
- value → String?
-
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onChanged(
String? value, {bool notify = false}) → void -
Sets the
value
of the field.override -
onUpdate(
void listener(String? value)) → void -
Callback for listening to changes in the field.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void -
Resets the field to its initial value.
inherited
-
setError(
InputFieldError error, {bool notify = true}) → void -
Sets the
error
of the field.inherited -
setInitialValue(
String? value, {bool notify = false}) → void -
Sets the initial
value
of the field.inherited -
setSubmitted(
bool value) → void -
Sets the
value
for isSubmitted of the field.inherited -
setValidators(
Set< InputFieldValidator> validators) → void -
Sets the
validators
for the field.inherited -
setValue(
String? value, {bool notify = true}) → void -
Sets the
value
of the field.override -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
validate(
{bool notify = true}) → bool -
Validates the field.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited