FunctionTransformHook<T, R> class

Helper class to adapt functions into TransformHooks.

Implemented types

Constructors

FunctionTransformHook(FutureOr<R> _func(HookContext context, T data))
Creates a new FunctionTransformHook instance accepting a HookContext and data.
FunctionTransformHook.stateless(FutureOr<R> func(T data))
Creates a stateless FunctionTransformHook instance accepting only data.
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
run(HookContext context, T data) → Future<R>
Executes the transformation hook logic, transforming data into type R with the given context.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited