FormifyForms class

Constructors

FormifyForms()

Properties

afterSetInitialValue Map<String, FormifyModifyValue?>
no setter
attributes List<Attribute>
A getter that returns a list of Attribute objects.
no setter
beforeSetValue Map<String, FormifyModifyValue?>
no setter
formBuilder FormifyFormBuilder?
A getter that provides a custom form widget builder.
no setter
hashCode int
The hash code for this object.
no setterinherited
inputDecoration InputDecoration?
A getter that provides custom input decoration for FormifyTextField.
no setter
isAutoValidation bool
A getter that determine whether automatic validation is enabled or not.
no setter
isLoadingNotifier ValueNotifier<bool>
A ValueNotifier for tracking the loading state.
final
labels Map<String, String>
A getter that returns a map of labels for form fields.
no setter
onSubmit → (dynamic Function()?)
A getter that provides a custom submit callback function for the last text form field.
no setter
rules Map<String, List<FormifyRule>>
A getter that returns a map of validation rules for form fields.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
separatorBuilder FormifySeparatorBuilder?
A getter that provides a custom separator widget builder.
no setter
separatorHorizontalBuilder FormifySeparatorBuilder?
A getter that provides a custom horizontal separator widget builder.
no setter
validationMessage Map<String, String>
A getter that returns a map of validation message for rule.
no setter

Methods

addErrorMessage(String attribute, String message) → dynamic
Add a custom error message to a form attribute's existing error messages.
clearAllErrorMessages() → dynamic
Clear all error messages associated with the form.
clearErrorMessages(String attribute) → dynamic
Clear error messages associated with a form attribute.
getAttributeType(String attribute) FormifyType
Get the type of a form attribute.
getController(String attribute) TextEditingController
Get a TextEditingController associated with a form attribute.
getErrorMessage(String attribute) String?
Get the first error message associated with a form attribute.
getErrorMessages(String attribute) List<String>?
Get the error messages associated with a form attribute.
getErrors() Map<String, List<String>>
Get error messages associated with form attributes.
getFormKey(String attribute) GlobalKey<FormFieldState>
Get a GlobalKey associated with a form attribute's form field state.
getLabel(String attribute) String
Get a human-readable label for a form attribute.
getRule(String attribute) List<FormifyRule>
Get the validation rules for a form attribute.
getValidatorMessage(String rule) String?
Get a validation message for a specific validation rule.
getValue(String attribute) → dynamic
Get the current value of a form attribute.
getValues() Map<String, dynamic>
Get the current values of all existing form attributes.
getWidgets() List<Widget>
Get a list of widgets corresponding to form attributes.
isFormValid() bool
Check if the form is valid.
isObscureText(String attribute) bool
Determines whether the text input associated with a specific attribute should be displayed in obscured (password) mode or not.
isRequired(String attribute) bool
Check if a form attribute is marked as required.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setErrorMessage(String attribute, String message) → dynamic
Set a custom error message for a form attribute.
setErrorMessages(String attribute, List<String> messages) → dynamic
Set custom error messages for a form attribute.
setInitialValue(String attribute, dynamic value) → dynamic
Set the initial value for a form attribute.
setInitialValues(Map<String, dynamic> values) → dynamic
Set the initial values for multiple form attributes.
setIsLoading(bool value) → dynamic
Set the loading state.
setValue(String attribute, dynamic value) → dynamic
Set the value for a form attribute and optionally trigger validation.
toggleObscureText(String attribute) → dynamic
Toggles the obscure text mode for a specific attribute in the form.
toString() String
A string representation of this object.
inherited
validateAttribute(String attribute, dynamic value) → dynamic
Validate a form attribute against its validation rules.

Operators

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