2021-01-14 21:48:05 +00:00
|
|
|
import 'package:get_it/get_it.dart';
|
2021-03-25 20:09:56 +00:00
|
|
|
import 'package:selfprivacy/logic/get_it/api_config.dart';
|
2024-01-26 14:46:09 +00:00
|
|
|
import 'package:selfprivacy/logic/get_it/api_connection_repository.dart';
|
2024-04-20 09:53:55 +00:00
|
|
|
import 'package:selfprivacy/logic/get_it/console_model.dart';
|
2021-02-15 18:58:29 +00:00
|
|
|
import 'package:selfprivacy/logic/get_it/navigation.dart';
|
2024-05-15 14:16:59 +00:00
|
|
|
import 'package:selfprivacy/logic/get_it/resources_model.dart';
|
2021-01-14 21:48:05 +00:00
|
|
|
|
2021-03-25 23:30:34 +00:00
|
|
|
export 'package:selfprivacy/logic/get_it/api_config.dart';
|
2024-01-31 10:57:12 +00:00
|
|
|
export 'package:selfprivacy/logic/get_it/api_connection_repository.dart';
|
2024-04-20 09:53:55 +00:00
|
|
|
export 'package:selfprivacy/logic/get_it/console_model.dart';
|
2021-02-15 18:58:29 +00:00
|
|
|
export 'package:selfprivacy/logic/get_it/navigation.dart';
|
|
|
|
|
2022-06-05 19:36:32 +00:00
|
|
|
final GetIt getIt = GetIt.instance;
|
2021-01-14 21:48:05 +00:00
|
|
|
|
2021-03-25 20:09:56 +00:00
|
|
|
Future<void> getItSetup() async {
|
2021-02-15 18:58:29 +00:00
|
|
|
getIt.registerSingleton<NavigationService>(NavigationService());
|
2021-01-19 12:05:40 +00:00
|
|
|
getIt.registerSingleton<ConsoleModel>(ConsoleModel());
|
2024-05-15 14:16:59 +00:00
|
|
|
getIt.registerSingleton<ResourcesModel>(ResourcesModel()..init());
|
|
|
|
getIt.registerSingleton<WizardDataModel>(WizardDataModel()..init());
|
2024-05-15 15:47:41 +00:00
|
|
|
|
|
|
|
final apiConfigModel = ApiConfigModel();
|
|
|
|
getIt.registerSingleton<ApiConfigModel>(apiConfigModel);
|
2021-03-25 20:09:56 +00:00
|
|
|
|
2024-01-26 14:46:09 +00:00
|
|
|
getIt.registerSingleton<ApiConnectionRepository>(
|
|
|
|
ApiConnectionRepository()..init(),
|
|
|
|
);
|
|
|
|
|
2021-03-25 20:09:56 +00:00
|
|
|
await getIt.allReady();
|
2021-01-14 21:48:05 +00:00
|
|
|
}
|