refactor: change singleton registrations to lazySingleton for improved performance
This commit is contained in:
@@ -26,12 +26,12 @@ class StaffMainModule extends Module {
|
||||
@override
|
||||
void binds(Injector i) {
|
||||
// Register the StaffConnectorRepository from data_connect
|
||||
i.addSingleton<StaffConnectorRepository>(
|
||||
i.addLazySingleton<StaffConnectorRepository>(
|
||||
StaffConnectorRepositoryImpl.new,
|
||||
);
|
||||
|
||||
// Register the use case from data_connect
|
||||
i.addSingleton(
|
||||
i.addLazySingleton(
|
||||
() => GetProfileCompletionUseCase(
|
||||
repository: i.get<StaffConnectorRepository>(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user