Retrofit classes implemented with interceptor and base features

This commit is contained in:
2022-09-29 22:41:22 +01:00
parent d5a906d998
commit 057c6284ce
11 changed files with 53 additions and 18 deletions

View File

@@ -10,12 +10,9 @@ import 'data/prefs/PreferenceProvider.dart';
GetIt locator = GetIt.instance;
void setupLocator() {
final dio = Dio();
locator.registerLazySingleton(() => PreferenceProvider());
locator.registerLazySingleton(() => CurrencyApi(dio));
locator.registerLazySingleton(() => BackupCurrencyApi(dio));
locator.registerLazySingleton(() => CurrencyApi.create());
locator.registerLazySingleton(() => BackupCurrencyApi.create());
locator.registerLazySingleton(() => RepositoryImpl());
locator.registerFactory(() => MainViewModel());
}