mirror of
https://github.com/hmalik144/easy_cc_flutter.git
synced 2025-12-10 03:05:34 +00:00
Removal of api key
Network calls, integration of retrofit api added backup api
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:easy_cc_flutter/MainViewModel.dart';
|
||||
import 'package:easy_cc_flutter/data/network/backupCurrencyApi.dart';
|
||||
import 'package:easy_cc_flutter/data/network/currencyApi.dart';
|
||||
import 'package:easy_cc_flutter/data/repository/RepositoryImpl.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
|
||||
@@ -7,8 +10,11 @@ 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(() => RepositoryImpl());
|
||||
locator.registerFactory(() => MainViewModel());
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user