Initial commit
This commit is contained in:
44
lib/core/di/injection_container.config.dart
Normal file
44
lib/core/di/injection_container.config.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format width=80
|
||||
|
||||
// **************************************************************************
|
||||
// InjectableConfigGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// coverage:ignore-file
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:get_it/get_it.dart' as _i174;
|
||||
import 'package:injectable/injectable.dart' as _i526;
|
||||
|
||||
import '../../feature/common/presentation/blocs/language_bloc/language_bloc.dart'
|
||||
as _i942;
|
||||
import '../../feature/home/presentation/blocs/home_bloc/home_bloc.dart'
|
||||
as _i1007;
|
||||
import '../../feature/main/presentation/blocs/main_bloc/main_bloc.dart'
|
||||
as _i580;
|
||||
import '../../feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart'
|
||||
as _i311;
|
||||
import '../../food_delivery_client.dart' as _i321;
|
||||
import '../router/app_routes.dart' as _i152;
|
||||
import '../services/storage_service.dart' as _i306;
|
||||
|
||||
extension GetItInjectableX on _i174.GetIt {
|
||||
// initializes the registration of main-scope dependencies inside of GetIt
|
||||
_i174.GetIt init({
|
||||
String? environment,
|
||||
_i526.EnvironmentFilter? environmentFilter,
|
||||
}) {
|
||||
final gh = _i526.GetItHelper(this, environment, environmentFilter);
|
||||
gh.factory<_i580.MainBloc>(() => _i580.MainBloc());
|
||||
gh.factory<_i311.SplashBloc>(() => _i311.SplashBloc());
|
||||
gh.factory<_i1007.HomeBloc>(() => _i1007.HomeBloc());
|
||||
gh.singleton<_i306.StorageService>(() => _i306.StorageService());
|
||||
gh.singleton<_i152.AppRoutes>(() => _i152.AppRoutes());
|
||||
gh.factory<_i942.LanguageBloc>(
|
||||
() => _i942.LanguageBloc(gh<_i321.StorageService>()),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
13
lib/core/di/injection_container.dart
Normal file
13
lib/core/di/injection_container.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import '../../food_delivery_client.dart';
|
||||
|
||||
final sl = GetIt.instance;
|
||||
|
||||
@InjectableInit(
|
||||
initializerName: 'init', // default
|
||||
preferRelativeImports: true, // default
|
||||
asExtension: true, // default
|
||||
)
|
||||
Future<void> configureDependencies() async {
|
||||
sl.init();
|
||||
await sl<StorageService>().initialize();
|
||||
}
|
||||
Reference in New Issue
Block a user