CustomPivot class
Represents a custom pivot for extensibility.
Use this to define custom type coercions or transformations that can be plugged into the builder chain.
Example:
class MyPivot extends CustomPivot {
MyPivot() : super(
(child) => Validator((value) => child.validate(value.toString())),
dropPre: true,
kind: 'toString',
);
}
final validator = v().use(MyPivot()).lengthMin(1).build();
Constructors
- CustomPivot(IValidator transformer(IValidator child), {bool dropPre = true, String? kind})
Properties
- dropPre → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transformer → IValidator Function(IValidator child)
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited