FormField<Value> class
Constructors
-
FormField({required String name, required Value initialValue, List<
FieldValidator< ? validators})Value> > - Create a new FormField that could get passed to a FormBloc addFields method
Properties
- error → String?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → Value
-
Get default value
no setter
- isTouched → bool
-
Return true if the field had been touched, false otherwise
no setter
- name → String
-
Get field name
no setter
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited -
validators
↔ List<
FieldValidator< Value> > -
getter/setter pair
- value → Value
-
Get field value
no setter
Methods
-
addValidators(
List< FieldValidator< validators) → voidValue> > -
copyWith(
{String? name, Value? initialValue, List< FieldValidator< ? validators}) → FormField<Value> >Value> -
getAllFieldSubscriptionNames(
) → List< String> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Reset the field to its default value
-
setTouched(
) → void -
setValue(
Value value) → void - Change the field value
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
[Map< String, FormField> fieldDependencies = const {}]) → String?
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited