mirror of
https://github.com/hmalik144/days_left_flutter.git
synced 2025-12-10 03:05:21 +00:00
- Implementation of firebase - Implementation of dependency injection Took 11 hours 26 minutes
18 lines
657 B
Dart
18 lines
657 B
Dart
import 'package:days_left/viewmodels/LoginViewModel.dart';
|
|
import 'package:days_left/viewmodels/UserAuthViewModel.dart';
|
|
import 'package:get_it/get_it.dart';
|
|
import 'data/FirebaseAuthData.dart';
|
|
import 'services/DialogService.dart';
|
|
import 'services/NavigationService.dart';
|
|
|
|
GetIt locator = GetIt.instance;
|
|
|
|
void setupLocator() {
|
|
final FirebaseAuthData firebaseSource = FirebaseAuthData();
|
|
|
|
locator.registerLazySingleton(() => NavigationService());
|
|
locator.registerLazySingleton(() => DialogService());
|
|
locator.registerLazySingleton(() => UserAuthViewModel(firebaseSource));
|
|
locator.registerLazySingleton(() => LoginViewModel(firebaseSource));
|
|
}
|