mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2025-12-22 09:30:45 +00:00
refactor(linter): Перейти на friflex_linter, обновить правила
This commit is contained in:
@@ -16,7 +16,7 @@ import 'package:friflex_starter/features/debug/i_debug_service.dart';
|
||||
final class DiContainer {
|
||||
/// {@macro dependencies_container}
|
||||
DiContainer({required this.env, required IDebugService dService})
|
||||
: debugService = dService;
|
||||
: debugService = dService;
|
||||
final AppEnv env;
|
||||
|
||||
/// Сервис для отладки, получаем из конструктора
|
||||
@@ -44,30 +44,20 @@ final class DiContainer {
|
||||
appConfig = switch (env) {
|
||||
AppEnv.dev => AppConfigDev(),
|
||||
AppEnv.prod => AppConfigProd(),
|
||||
AppEnv.stage => AppConfigStage()
|
||||
AppEnv.stage => AppConfigStage(),
|
||||
};
|
||||
|
||||
// Инициализация HTTP клиента
|
||||
httpClientFactory = (debugService, appConfig) => AppHttpClient(
|
||||
debugService: debugService,
|
||||
appConfig: appConfig,
|
||||
);
|
||||
httpClientFactory = (debugService, appConfig) =>
|
||||
AppHttpClient(debugService: debugService, appConfig: appConfig);
|
||||
|
||||
// Инициализация сервисов
|
||||
services = DiServices()
|
||||
..init(
|
||||
onProgress: onProgress,
|
||||
onError: onError,
|
||||
diContainer: this,
|
||||
);
|
||||
..init(onProgress: onProgress, onError: onError, diContainer: this);
|
||||
// throw Exception('Тестовая - ошибка инициализации зависимостей');
|
||||
// Инициализация репозиториев
|
||||
repositories = DiRepositories()
|
||||
..init(
|
||||
onProgress: onProgress,
|
||||
onError: onError,
|
||||
diContainer: this,
|
||||
);
|
||||
..init(onProgress: onProgress, onError: onError, diContainer: this);
|
||||
|
||||
onComplete('Инициализация зависимостей завершена!');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user