SuperFormState class

SuperForm state which holds all field data and can be called to modify the form.

Inheritance
Mixed in types

Constructors

SuperFormState()

Properties

bucket RestorationBucket?
The RestorationBucket used for the restoration data of the RestorablePropertys registered to this mixin.
no setterinherited
context BuildContext
The location in the tree where this widget builds.
no setterinherited
data Map<String, SuperFormFieldData>
no setter
enabled bool
no setter
errors Map<String, List<ValidationError>>
Gets a map of field names and their errors.
no setter
formId String
Form id - just a string of random characters, uuid like.
no setter
hashCode int
The hash code for this object.
no setterinherited
modified bool
Returns true when any field is modified considering given initialValues
no setter
mounted bool
Whether this State object is currently in a tree.
no setterinherited
restorationId String?
The restoration ID used for the RestorationBucket in which the mixin will store the restoration data of all registered properties.
no setteroverride
restorePending bool
Whether restoreState will be called at the beginning of the next build phase.
no setterinherited
rules Map<String, List<SuperFormFieldRule>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validationMode ValidationMode
no setter
values Map<String, dynamic>
Gets a map of field names and their values.
no setter
widget SuperForm
The current configuration.
no setterinherited

Methods

activate() → void
Called when this object is reinserted into the tree after having been removed via deactivate.
inherited
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
deactivate() → void
Called when this object is removed from the tree.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
didToggleBucket(RestorationBucket? oldBucket) → void
Called when bucket switches between null and non-null values.
inherited
didUpdateRestorationId() → void
Must be called when the value returned by restorationId changes.
inherited
didUpdateWidget(covariant SuperForm oldWidget) → void
Called whenever the widget configuration changes.
override
dispose() → void
Called when this object is removed from the tree permanently.
inherited
initState() → void
Called when this object is inserted into the tree.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
register({required String name, required List<SuperFormFieldRule> rules, SuperFormFieldState? fieldState}) SuperFormFieldData
Registers the field for a given name with a set of rules.
registerForRestoration(RestorableProperty<Object?> property, String restorationId) → void
Registers a RestorableProperty for state restoration.
inherited
reset({String? name}) → void
Resets all fields or one specific field with name.
restoreState(RestorationBucket? oldBucket, bool initialRestore) → void
Called to initialize or restore the RestorablePropertys used by the State object.
override
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed.
inherited
setTouched(String name, bool touched) → void
Sets touched value for field under given name.
setValue(String name, dynamic value) → void
Sets value for field under given name.
submit() → void
Submits the form.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
unregister({required String name, SuperFormFieldState? fieldState}) → void
Un-registers the field, removing all of its data.
unregisterFromRestoration(RestorableProperty<Object?> property) → void
Unregisters a RestorableProperty from state restoration.
inherited
updateFieldData(SuperFormFieldData newData) → void
Updates field data.
updateFieldRules(String name, Iterable<SuperFormFieldRule> rules) → void
Updates field rules.
validate(String name, {bool markSubmitted = false}) bool
Validates field and updates it state

Operators

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