ValueConverter<P extends Object, F extends Object> class
abstract
Defines value converter between PropertyDescriptor<P>
value
and FormField<F>
value.
P
is type of property value and F
is form field value.
Typically, you can implement StringConverter
or just use one of the
predefined string converters instead of implementing this class directly
for text field based form fields
- Implementers
Constructors
- ValueConverter()
- Initializes a new ValueConverter instance.
-
ValueConverter.fromCallbacks({required PropertyToFieldConverter<
P, F> toFieldValue, required FieldToPropertyConverter<P, F> toPropertyValue}) -
Creates a new ValueConverter from specified callbacks.
factory
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toFieldValue(
P? value, Locale locale) → F? -
Converts the property
value
to form field's value. -
toPropertyValue(
F? value, Locale locale) → SomeConversionResult< P> -
Converts the form field saved
value
to property's value. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited