FormProvider class

Mixed-in types

Constructors

FormProvider({Dio? httpClient})

Properties

allFields List<Field>
getter/setter pair
autoFillInProgress Map<String, bool>
getter/setter pair
currentComponent String?
getter/setter pair
deletingIndices Set<int>
getter/setter pair
dependentValues Map<String, Map<String, dynamic>>
getter/setter pair
displayMode DisplayMode
getter/setter pair
errors Map<String, String?>
getter/setter pair
fieldsDisabled Map<String, bool>
getter/setter pair
formDefinitions Map<String, FormDefinition>
getter/setter pair
formValidation String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
httpClient → Dio?
final
nestedObject Map<String, dynamic>?
getter/setter pair
options Map<String, List<Option>>
getter/setter pair
optionsInProgress Map<String, bool>
getter/setter pair
previousComponent String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
submitted bool
getter/setter pair
touched Map<String, bool>
getter/setter pair
values Map<String, dynamic>
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
convertDataType(String? dataType, dynamic value) → dynamic
deriveRepeatableArrayPath(String fieldName) String?
Derive the nested array path for a repeatable field name Example: "property_details0.data.floor_details{index}.floor_name" -> "property_details.0.data.floor_details"
deriveRepeatableBasePatternFromConcrete(String fieldName) String?
From a concrete field name, derive the base path (with prior fixed indices kept) Example: "property_details0.data.floor_details2.floor_name" -> "property_details0.data.floor_details"
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
escapeRegex(String str) String
Escape regex special characters
extractFields(FormDefinition formDefinition, {int? index}) List<Field>
extractFieldsFromAllDefinitions() List<Field>
fetchFieldOptions(Field field, Map<String, dynamic> formValues) Future<void>
getFieldError(String fieldName) String?
getFieldOptions(String fieldName) List<Option>
getFormDefinition(String componentName) FormDefinition?
getFormValue(String fieldName) → dynamic
getNestedValue(Map<String, dynamic> data, String path) → dynamic
Get nested value from a map/list using dot notation with numeric indices Supports paths like: "property_details.0.data.floor_details"
handleAddMore(String componentName) → void
handleAutoFill(Field field) → void
handleChange(Field field, dynamic value) → void
handleDynamicFormSubmit() → void
handleRemoveMore(String componentName, int indexToRemove) → void
hasNullValue(dynamic value) bool
initializeForm(String componentName, FormDefinition formJson, Map<String, dynamic>? existingData, DisplayMode mode) → void
isFieldDisabled(String fieldName) bool
Checks if a field is disabled based on its disabledOn condition or predefined disable flag.
isValidForm() bool
Validates all form fields and returns true if the form is valid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
processFieldLogic(Field field) Future<void>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeMore(String componentName, int index) Future<void>
selectIsFieldRequired(Field field) bool
setCurrentComponent(String componentName) → void
setDependentValue({required String fieldName, required String dependencyName, required dynamic value}) → void
setFieldOptions(String fieldName, List<Option> newOptions) → void
setFormValue(String fieldName, dynamic value) → dynamic
shouldRenderField(Field field) bool
toString() String
A string representation of this object.
inherited
validateAllFields() → void
validateField(Field field) → void

Operators

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