Closed davidsdearaujo closed 1 year ago
When we try to register a lazy singleton class with inversion of control, it doesn't works. Look this example:
abstract class InversionOfControlInterface {} class Implementation implements InversionOfControlInterface {} void main() { final injector = AutoInjector(); injector.addLazySingleton<InversionOfControlInterface>(Implementation.new); injector.commit(); final instance = injector.get<InversionOfControlInterface>(); }
It throws an error at the last line: InversionOfControlInterface unregistered.
InversionOfControlInterface unregistered.
When we try to register a lazy singleton class with inversion of control, it doesn't works. Look this example:
It throws an error at the last line:
InversionOfControlInterface unregistered.