FunctionTransformation<T, U> class
A Transformation that invokes a given function of type TransformationFunction.
This class is intended as a convenience, and is typically used in conjunction with a lambda. It can be used when a transformation is required as part of a larger transformation, but that transformation is not typically useful outside that context.
final letterCountForNumber = const CardinalWordsTransformation().then(FunctionTransformation<String, String>(
(input, locale) => 'That number has ${input.length} characters when written in cardinal form'));
- Inheritance
-
- Object
- Transformation<
T, U> - FunctionTransformation
- Available Extensions
Constructors
-
FunctionTransformation(TransformationFunction<
T, U> lambda) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
lambda
→ TransformationFunction<
T, U> -
final
- 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
-
toString(
) → String -
A string representation of this object.
inherited
-
transform(
T input, String locale) → U -
Transforms
input
into an instance ofU
using the providedlocale
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited