create method
void
create()
Implementation
void create() {
view.createPipeInstance(instance.name, meta);
for (final purePipeProxy in _purePipeProxies) {
final pipeInstanceSeenFromPureProxy = getPropertyInView(
instance,
purePipeProxy.view,
view,
);
final transformType = meta.transformType!;
// A pipe transform method has one required argument, and a variable
// number of optional arguments. However, each call site will always
// invoke the transform method with a fixed number of arguments, so we
// can use a pure proxy with the same number of required arguments.
final pureProxyType = o.FunctionType(
transformType.returnType,
transformType.paramTypes.sublist(0, purePipeProxy.argCount),
);
purePipeProxy.view.createPureProxy(
pipeInstanceSeenFromPureProxy.prop('transform'),
purePipeProxy.argCount,
purePipeProxy.instance,
pureProxyType: pureProxyType,
);
}
}