registerFactoryAsyncWithTwoParams<T, P1, P2> function
ToorLocatorAsyncWithTwoParameters<T, P1, P2>
registerFactoryAsyncWithTwoParams<T, P1, P2>(
- FactoryFuncAsyncWithTwoParameters<
T, P1, P2> factoryFunc
Registers an asynchronous factory via factoryFunc.
This might be useful when injecting a dependency to T, that can only
be obtained asynchronously (e.g. SharedPreferences.getInstance()).
{@macro ToorRegisterFactoryAsync}
Factories, created with registerFactoryAsyncWithTwoParams allow you to pass two parameters to the factory you're creating.
Implementation
ToorLocatorAsyncWithTwoParameters<T, P1, P2>
registerFactoryAsyncWithTwoParams<T, P1, P2>(
FactoryFuncAsyncWithTwoParameters<T, P1, P2> factoryFunc,
) {
return _instance.registerFactoryAsyncWithTwoParams(factoryFunc);
}