appThemeModule function

Future<void> appThemeModule()

Implementation

Future<void> appThemeModule() async {
  //datasource
  themeLocator.registerSingleton<AppThemePreferences>(AppThemePreferencesImpl(await SharedPreferences.getInstance()));
  //repo
  themeLocator.registerSingleton<AppThemeRepository>(AppThemeRepositoryImpl(themeLocator.get()));
  //useCases
  themeLocator.registerSingleton(GetAppThemUseCase(themeLocator.get()));
  themeLocator.registerSingleton(SaveAppThemeUseCase(themeLocator.get()));
  themeLocator.registerSingleton(AppThemeBloc(themeLocator.get(), themeLocator.get()));
}