createInjectable method
- Dependencies dependencies
Creates a new instance of the injectable.
dependencies: The resolved dependencies required by this factory.
Returns a Future that completes with the created instance.
Implementation
Future<Object> createInjectable(Dependencies dependencies) {
final instanceOrFuture = _creator(dependencies);
if(instanceOrFuture is InjectableWithReadyInterface) return instanceOrFuture.injectableReady.then((value) => instanceOrFuture);
if(instanceOrFuture is Future<Object>) return instanceOrFuture;
return Future.value(instanceOrFuture);
}