diff --git a/lib/features/update/README.md b/lib/features/update/README.md index 05fb779..421c740 100644 --- a/lib/features/update/README.md +++ b/lib/features/update/README.md @@ -37,6 +37,7 @@ - Статический метод `show` безопасно не откроет модалку, если `updateEntity == null` Пример показа модального окна: + ```dart await SoftUpdateModal.show( context, @@ -54,10 +55,9 @@ await SoftUpdateModal.show( - `UpdateRoutes.buildRoutes()` — регистрирует экран hard-обновления по пути `/update` - ## Структура модуля -``` +```md features/update/ ├── data/ │ └── repository/ diff --git a/lib/features/update/data/repository/update_mock_repository.dart b/lib/features/update/data/repository/update_mock_repository.dart index 8251876..554fed9 100644 --- a/lib/features/update/data/repository/update_mock_repository.dart +++ b/lib/features/update/data/repository/update_mock_repository.dart @@ -26,7 +26,7 @@ final class UpdateMockRepository implements IUpdateRepository { @override Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }) async { // Имитация задержки для асинхронной операции diff --git a/lib/features/update/data/repository/update_repository.dart b/lib/features/update/data/repository/update_repository.dart index a44ad11..3d3bdff 100644 --- a/lib/features/update/data/repository/update_repository.dart +++ b/lib/features/update/data/repository/update_repository.dart @@ -14,7 +14,7 @@ final class UpdateRepository implements IUpdateRepository { @override Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }) { // TODO: Реализовать реальную логику проверки обновлений diff --git a/lib/features/update/domain/repository/i_update_repository.dart b/lib/features/update/domain/repository/i_update_repository.dart index 39abe4d..48209be 100644 --- a/lib/features/update/domain/repository/i_update_repository.dart +++ b/lib/features/update/domain/repository/i_update_repository.dart @@ -6,11 +6,11 @@ import 'package:friflex_starter/features/update/domain/entity/update_entity.dart /// {@endtemplate} abstract interface class IUpdateRepository with DiBaseRepo { /// Проверяет наличие обновлений - /// [versionCode] - текущий код версии приложения + /// [versionApp] - текущий версия приложения /// [platform] - платформа (например, 'android' или 'ios') /// Возвращает [UpdateEntity] с информацией об обновлении Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }); } diff --git a/lib/features/update/domain/state/cubit/update_cubit.dart b/lib/features/update/domain/state/cubit/update_cubit.dart index aaba84e..e7ca6a3 100644 --- a/lib/features/update/domain/state/cubit/update_cubit.dart +++ b/lib/features/update/domain/state/cubit/update_cubit.dart @@ -16,17 +16,17 @@ class UpdateCubit extends Cubit { final IUpdateRepository _updatesRepository; /// Метод для проверки доступности обновлений - /// [versionCode] - текущий код версии приложения + /// [versionApp] - текущая версия приложения /// [platform] - платформа (например, 'android' или 'ios') Future checkForUpdates({ - required String versionCode, + required String versionApp, required String platform, }) async { if (state is UpdateLoadingState) return; emit(const UpdateLoadingState()); try { final updateInfo = await _updatesRepository.checkForUpdates( - versionCode: versionCode, + versionApp: versionApp, platform: platform, ); emit(UpdateSuccessState(updateInfo)); diff --git a/lib/runner/app_runner.dart b/lib/runner/app_runner.dart index 4e70ef0..3242b69 100644 --- a/lib/runner/app_runner.dart +++ b/lib/runner/app_runner.dart @@ -33,7 +33,7 @@ class AppRunner { /// Тип окружения сборки приложения¬ final AppEnv env; - /// Контейнер зависимостей приложения + /// Сервис отладки late IDebugService _debugService; /// Роутер приложения