mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2026-02-05 11:42:17 +00:00
fix(update): изменить название параметра versionCode на versionApp в методах проверки обновлений
This commit is contained in:
@@ -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<UpdateEntity> checkForUpdates({
|
||||
required String versionCode,
|
||||
required String versionApp,
|
||||
required String platform,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,17 +16,17 @@ class UpdateCubit extends Cubit<UpdateState> {
|
||||
final IUpdateRepository _updatesRepository;
|
||||
|
||||
/// Метод для проверки доступности обновлений
|
||||
/// [versionCode] - текущий код версии приложения
|
||||
/// [versionApp] - текущая версия приложения
|
||||
/// [platform] - платформа (например, 'android' или 'ios')
|
||||
Future<void> 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));
|
||||
|
||||
Reference in New Issue
Block a user