FormConfig class
Configuration for an entire dynamic form.
Contains a list of field configurations and optional form-level settings.
Example:
final formConfig = FormConfig(
fields: [
TextFieldConfig(id: 'name', label: 'Full Name'),
RadioFieldConfig(id: 'gender', label: 'Gender', options: [...]),
DateFieldConfig(id: 'dob', label: 'Date of Birth'),
],
submitButtonText: 'Submit',
);
Constructors
-
FormConfig({required List<
DynamicFormField> fields, String? submitButtonText, bool validateOnChange = false}) -
Creates a form configuration.
const
Properties
-
fields
→ List<
DynamicFormField> -
List of field configurations for this form.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- submitButtonText → String?
-
Text to display on the submit button.
final
- validateOnChange → bool
-
Whether to validate the form on every field change.
final
Methods
-
getFieldById(
String id) → DynamicFormField? - Returns a field configuration by its ID.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited