refactor: change singleton registrations to lazySingleton for improved performance

This commit is contained in:
Achintha Isuru
2026-03-09 15:01:18 -04:00
parent 46ca10933a
commit 7a5c130289
10 changed files with 41 additions and 41 deletions

View File

@@ -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>(),
),