FormContext class
The context for handling the form.
You can generate it with useForm.
Properties
- exists → bool
-
If the form edits an existing one,
true
.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
key
→ GlobalKey<
FormState> -
The key for the form.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uid → String
-
The UID of the document for the form.
final
Methods
-
copyTo<
T extends dynamic> (T target, dynamic keyAndInitialValues) → T -
Copy the data stored in the form and
context
totarget
. -
get<
T> (String key, T orElse) → T -
Gets the value from the
key
of the map stored incontext
. -
getAsDateTime(
String key, [DateTime? orElse]) → DateTime -
Get the set corresponding to
key
in the DateTime. -
getAsList<
T> (String key, [List< T> ? orElse]) → List<T> -
Get the list corresponding to
key
in the map. -
getAsMap<
T> (String key, [Map< String, T> ? orElse]) → Map<String, T> -
Get the map corresponding to
key
in the map. -
getAsSets<
T> (String key, [Set< T> ? orElse]) → Set<T> -
Get the set corresponding to
key
in the map. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
select<
T> (T exist, T orElse) → T -
If the document exists,
exist
will be displayed, and if it is new,orElse
will be displayed. -
toString(
) → String -
A string representation of this object.
inherited
-
validate(
{bool autoUnfocus = true, dynamic initial = const {}}) → bool - Validate the data in the form.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator []=(
String key, dynamic value) → void -
Save
value
tokey
of the map stored incontext
.