mirror of
https://github.com/hmalik144/easy_cc_flutter.git
synced 2025-12-10 03:05:34 +00:00
17 lines
700 B
Dart
17 lines
700 B
Dart
import 'package:easy_cc_flutter/main_view_model.dart';
|
|
import 'package:easy_cc_flutter/data/network/backup_currency_api.dart';
|
|
import 'package:easy_cc_flutter/data/network/currency_api.dart';
|
|
import 'package:easy_cc_flutter/data/repository/repository_impl.dart';
|
|
import 'package:get_it/get_it.dart';
|
|
|
|
import 'data/prefs/preference_provider.dart';
|
|
|
|
GetIt locator = GetIt.instance;
|
|
|
|
void setupLocator() {
|
|
locator.registerLazySingleton(() => PreferenceProvider());
|
|
locator.registerLazySingleton(() => CurrencyApi.create());
|
|
locator.registerLazySingleton(() => BackupCurrencyApi.create());
|
|
locator.registerLazySingleton(() => RepositoryImpl());
|
|
locator.registerFactory(() => MainViewModel());
|
|
} |