TextFieldState class

Wrapper with all the necessary methods and fields to make a TextField reactive to any changes and validations.

Inheritance

Constructors

TextFieldState({String? text, dynamic onChanged(TextFieldState)?, FutureOr<void> onFocus(TextFieldState)?, FutureOr<void> onSubmitted(TextFieldState)?, RxStatus? status, FocusNode? focus, bool approvable = false, bool editable = true, bool submitted = true, String? error})

Properties

approvable bool
Indicator whether controller's text should be approved.
getter/setter pairinherited
changed RxBool
Indicator whether controller's text was changed.
final
controller TextEditingController
TextEditingController of this ReactiveFieldState.
latefinaloverride-getter
editable RxBool
Indicator whether this ReactiveFieldState should be editable or not.
latefinaloverride-getter
error RxnString
Reactive error message.
finalinherited
focus FocusNode
FocusNode of this ReactiveFieldState used to determine focus changes.
latefinaloverride-getter
hashCode int
The hash code for this object.
no setterinherited
isEmpty RxBool
Indicator whether controller's text is empty or not.
latefinaloverride-getter
isFocused RxBool
Reactive FocusNode.hasFocus of this ReactiveFieldState.
finalinherited
isValidated bool
Indicates whether onFocus was called after the focus change and no more text editing was done since then.
no setter
onChanged → dynamic Function(TextFieldState)?
Callback, called every time when the text changes.
final
onFocus FutureOr<void> Function(TextFieldState)?
Callback, called when the text has finished changing.
final
onSubmitted FutureOr<void> Function(TextFieldState)?
Callback, called when the text is submitted.
final
resubmitOnError RxBool
Indicator whether this ReactiveFieldState can still be submitted, when it has an error, or is not changed.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status Rx<RxStatus>
Reactive RxStatus of this ReactiveFieldState.
latefinaloverride-getter
submittable RxBool
Indicator whether this ReactiveFieldState can be submitted.
finalinherited
text String
Returns the text of the TextEditingController.
getter/setter pair
unchecked String?
Sets the text of TextEditingController to value without calling onFocus and onChanged.
no getter

Methods

clear({bool unfocus = true}) → void
Clears the TextEditingController's text without calling onFocus and onChanged.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
submit() → void
Submits this ReactiveFieldState.
override
toString() String
A string representation of this object.
inherited
unsubmit() → void
Clears the last submitted value.

Operators

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