完成集成新的登录接口的更换使用 完成集成用户的场站列表接口 完成开发设计选择场站项为全局属性 完成我的页面的个人信息的集成和详情页面的开发 完成设备页面的中无人机机场的列表接口对接入和个项页面的布局的优化 完成设备页面的中无人机机场的详情接口的对接和使用和页面的更新布局
68 lines
1.3 KiB
Dart
68 lines
1.3 KiB
Dart
import 'version_check_service.dart';
|
|
|
|
/// 更新状态基类
|
|
abstract class UpdateState {
|
|
const UpdateState();
|
|
}
|
|
|
|
/// 初始状态
|
|
class UpdateInitial extends UpdateState {
|
|
const UpdateInitial();
|
|
}
|
|
|
|
/// 检查中
|
|
class UpdateChecking extends UpdateState {
|
|
const UpdateChecking();
|
|
}
|
|
|
|
/// 发现新版本
|
|
class UpdateAvailable extends UpdateState {
|
|
final AppVersionInfo versionInfo;
|
|
|
|
const UpdateAvailable(this.versionInfo);
|
|
}
|
|
|
|
/// 下载中
|
|
class UpdateDownloading extends UpdateState {
|
|
final double progress;
|
|
final bool isPatch; // true=差量补丁, false=完整APK
|
|
|
|
const UpdateDownloading(this.progress, {required this.isPatch});
|
|
}
|
|
|
|
/// 清理版本号中
|
|
class UpdateClearingVersion extends UpdateState {
|
|
const UpdateClearingVersion();
|
|
}
|
|
|
|
/// 准备安装
|
|
class UpdateReadyToInstall extends UpdateState {
|
|
final String apkPath;
|
|
|
|
const UpdateReadyToInstall(this.apkPath);
|
|
}
|
|
|
|
/// 安装中
|
|
class UpdateInstalling extends UpdateState {
|
|
final bool isPatch;
|
|
|
|
const UpdateInstalling({required this.isPatch});
|
|
}
|
|
|
|
/// 更新成功
|
|
class UpdateSuccess extends UpdateState {
|
|
const UpdateSuccess();
|
|
}
|
|
|
|
/// 已是最新版本
|
|
class UpdateUpToDate extends UpdateState {
|
|
const UpdateUpToDate();
|
|
}
|
|
|
|
/// 更新失败
|
|
class UpdateFailure extends UpdateState {
|
|
final String error;
|
|
|
|
const UpdateFailure(this.error);
|
|
}
|