FormeKey class
form key is a global key , also used to manage form
- Inheritance
-
- Object
- Key
- GlobalKey<
State< StatefulWidget> > - LabeledGlobalKey<
State< StatefulWidget> > - FormeKey
- Implemented types
Properties
-
controllers
→ List<
FormeFieldController> -
get all registered controllers
no setteroverride
- currentContext → BuildContext?
-
The build context in which the widget with this key builds.
no setterinherited
-
currentState
→ State<
StatefulWidget> ? -
The State for the widget in the tree that currently has this global key.
no setterinherited
- currentWidget → Widget?
-
The widget in the tree that currently has this global key.
no setterinherited
-
data
↔ Map<
String, dynamic> -
get form data
getter/setter pairoverride
-
fieldsListenable
→ ValueListenable<
Map< String, FormeFieldController?> > -
listen when fields initialed or disposed
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialized → bool
-
whether formKey is initialized
no setter
- isValueChanged → bool
-
whether form' value changed after initialized
no setteroverride
- quietlyValidate ↔ bool
-
whether validate is quietly
getter/setter pairoverride
- readOnly ↔ bool
-
whether form is readonly
getter/setter pairoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- validation → FormeValidation
-
get validation of Form
no setteroverride
-
validationListenable
→ ValueListenable<
FormeValidation> -
used to listen any form field's validation changes
no setteroverride
Methods
-
field<
T extends FormeFieldController> (String name) → T -
find FormeFieldController by name
override
-
fieldListenable<
T> (String name) → ValueListenable< FormeFieldController< T> ?> -
listen when field initialed or disposed
override
-
hasField(
String name) → bool -
whether form has a name field
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void -
reset form
override
-
save(
) → void -
save all form fields
override
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
{bool quietly = false, Set< String> names = const {}, bool clearError = false, bool validateByOrder = false}) → Future<FormeValidateSnapshot> -
perform a validate
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → FormeController?