DynamicFormField class abstract
Abstract base class for all dynamic form field configurations.
This class defines the common properties shared by all field types. Extend this class to create custom field types for your application.
Example:
class SliderFieldConfig extends DynamicFormField {
final double min;
final double max;
const SliderFieldConfig({
required super.id,
required super.label,
required this.min,
required this.max,
super.isRequired,
super.initialValue,
super.validators,
});
@override
FieldType get fieldType => FieldType.custom('slider');
}
- Implementers
Constructors
-
DynamicFormField({required String id, required String label, bool isRequired = false, dynamic initialValue, List<
FieldValidator> validators = const []}) -
Creates a new dynamic form field configuration.
const
Properties
- fieldType → FieldType
-
Returns the type of this field.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Unique identifier for this field.
final
- initialValue → dynamic
-
Initial value for this field.
final
- isRequired → bool
-
Whether this field is required.
final
- label → String
-
Display label for this field.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
validators
→ List<
FieldValidator> -
List of validators to apply to this field.
final
Methods
-
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.
override