ValidationParser<I, O> class
It allows you to convert a field from an x
type to a y
type.
- Inheritance
-
- Object
- Validation<
I> - ValidationParser
Constructors
-
ValidationParser(O converter(I value), {String? errorCode, List<
Validator< validators = const []})O> > -
const
Properties
- converter → O Function(I value)
-
final
- errorCode → String?
-
Use a custom error string to differentiate between errors
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
validators
→ List<
Validator< O> > -
final
Methods
-
call(
I value) → Object? -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
doubleToInt(
{String? errorCode = InvalidValidationError.rationalCode, List< Validator< validators = const []}) → ValidationParser<int> >double, int> -
stringToDouble(
{String? errorCode = InvalidValidationError.doubleCode, List< Validator< validators = const []}) → ValidationParser<double> >String, double> -
stringToInt(
{String? errorCode = InvalidValidationError.intCode, List< Validator< validators = const []}) → ValidationParser<int> >String, int> -
stringToRational(
{String? errorCode = InvalidValidationError.rationalCode, List< Validator< validators = const []}) → ValidationParser<Rational> >String, Rational>