FormCraft class
A utility class that helps manage and interact with a collection of FormCraftTextField widgets.
Constructors
- FormCraft()
- Create a new instance of FormCraft.
- FormCraft.test(FormCraftFieldManager fieldManager, FormCraftValidatorManager validatorManager)
- Create a new instance of FormCraft for testing purposes.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildTextField(
String key, Widget textField(GlobalKey< FormCraftTextFieldState> globalKey)) → Widget - Builds a FormCraftTextField widget with the specified key and configuration.
-
dispose(
) → void - Disposes of all resources and clears the field and global key maps.
-
getFocusNode(
String key) → FocusNode - Gets FocusNode for a specific field.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reassignInputValue(
String key, String value) → void - Reassigns the input value for a specific field.
-
refreshForm(
) → void - Refreshes the state of all FormCraftTextField widgets.
-
setErrorMessage(
String key, String? errorMessage, {bool isRedrawState = true}) → void - Sets a custom error message for a specific field.
-
setValidationType(
FormCraftValidationType type) → void - Sets the validation type for all FormCraftTextField widgets.
-
submitForm(
) → Map< String, String> - Submits the values of all FormCraftTextField widgets.
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → bool - Validates all FormCraftTextField widgets and returns true if all are valid.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited