castCallback1ForDirective<T, A> function
- @Deprecated('Use directiveTypes: [ ... ] to properly type instead')
- T callback(
- A
Wraps an typed callback with a single parameter of type A.
This function returns an untyped callback with a single parameter of type
dynamic, which in turn dynamically is casted/checked to A before invoking
callback.
Implementation
@Deprecated('Use directiveTypes: [ ... ] to properly type instead')
T Function(dynamic) castCallback1ForDirective<T, A>(
T Function(A) callback,
) {
return (element) => callback(element as A);
}