selfprivacy.org.app/lib/config/get_it_config.dart

26 lines
926 B
Dart
Raw Normal View History

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';
import 'package:selfprivacy/logic/get_it/api_connection_repository.dart';
2021-01-14 21:48:05 +00:00
import 'package:selfprivacy/logic/get_it/console.dart';
2021-02-15 18:58:29 +00:00
import 'package:selfprivacy/logic/get_it/navigation.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';
2021-02-15 18:58:29 +00:00
export 'package:selfprivacy/logic/get_it/console.dart';
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());
2021-03-25 20:09:56 +00:00
getIt.registerSingleton<ApiConfigModel>(ApiConfigModel()..init());
getIt.registerSingleton<ApiConnectionRepository>(
ApiConnectionRepository()..init(),
);
2021-03-25 20:09:56 +00:00
await getIt.allReady();
2021-01-14 21:48:05 +00:00
}