FormProperties class

Represents properties of the form bound to the presenter.

This object is immutable and equatable, so you can use this object for state management mechanism well.

Available extensions
Annotations

Properties

hashCode int
The hash code for this object.
no setteroverride
presenter CompanionPresenterMixin
Gets a CompanionPresenterMixin instance which holds this properties state.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canSubmit(BuildContext context) bool
Calls bound presenter's CompanionPresenterMixin.canSubmit.
copyWithProperties(Map<String, Object?> newValues) FormProperties
Returns a copy of this instance with specified new properties.
copyWithProperty(String name, Object? newValue) FormProperties
Returns a copy of this instance with a specified new property.
getAllDescriptors() Iterable<PropertyDescriptor<Object, Object>>
Gets all registered PropertyDescriptors.
getDescriptor<P extends Object, F extends Object>(String name) PropertyDescriptor<P, F>
Gets a PropertyDescriptor for the specified name, which was registered via CompanionPresenterMixin.initializeCompanionMixin.
getFieldValidator<F extends Object>(String name, BuildContext context) FormFieldValidator<F>

Available on FormProperties, provided by the FormPropertiesExtension extension

Gets a validator to validate form field input.
getInitialValue<F extends Object>(BuildContext context, String name) → F?

Available on FormProperties, provided by the FormPropertiesExtension extension

Wraps specified initialValue, which is taken from PropertyDescriptor.getFieldValue, with infrastructure support logic for state restoration.
getValue(String name) Object?
Gets a value of specified property.
hasPendingAsyncValidations(String name) bool

Available on FormProperties, provided by the FormPropertiesExtension extension

Gets a value which indicates that specified property has pencing asynchronous validation or not.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChanged<F extends Object>(BuildContext context, String name, [ValueSetter<F?>? onChanged]) ValueSetter<F?>

Available on FormProperties, provided by the FormPropertiesExtension extension

Wraps specified onChanged, which takes nullable value, with infrastructure support logic for state restoration.
onChangedNonNull<F extends Object>(BuildContext context, String name, [ValueSetter<F>? onChanged]) ValueSetter<F>

Available on FormProperties, provided by the FormPropertiesExtension extension

Wraps specified onChanged, which takes non-nullable value, with infrastructure support logic for state restoration.
savePropertyValue(String name, BuildContext context) → void Function(dynamic)

Available on FormProperties, provided by the FormPropertiesExtension extension

Gets a setter to set a proprty value with validated form field input.
submit(BuildContext context) → void Function()?
Calls bound presenter's CompanionPresenterMixin.submit.
toString() String
A string representation of this object.
inherited
tryGetDescriptor<P extends Object, F extends Object>(String name) PropertyDescriptor<P, F>?
Tries to get a PropertyDescriptor for the specified name, which was registered via CompanionPresenterMixin.initializeCompanionMixin.

Operators

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