FormUtils class mixin
Class used as a dart Mixin
to a Form
class, providing methods to conviniently
deal with validation and serialization of fields.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fieldsToJson(
List< FormField> fields) → Map<String, dynamic> -
Method to help in the task of passing the provided
List<FormField>
to itsMap<String, dynamic>
representation, that is useful when it comes to pass theForm
data through, for instance, a request body -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateField<
Type> ({required Maybe< Type> field, required List<Validator< validators}) → Result<Type> >String> -
Method to help validate a FormField<Type> providing its value represented by its
Maybe<Type>
, and aList<Validator<Type>>
, returning aResult<String>
with possible error message.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited