state.dart 618 B

12345678910111213141516171819202122
  1. import 'package:dio/dio.dart';
  2. import 'package:get/get.dart';
  3. class AppUpgradeState {
  4. final RxBool _updating = RxBool(false);
  5. final RxDouble _progress = RxDouble(0.0);
  6. final RxString _currentVersion = ''.obs;
  7. CancelToken? cancelToken;
  8. /// 是否正在更新
  9. bool get updating => _updating.value;
  10. set updating(bool val) => _updating.value = val;
  11. /// 进度值
  12. double get progress => _progress.value;
  13. set progress(double val) => _progress.value = val;
  14. /// 当前版本号
  15. String get currentVersion => _currentVersion.value;
  16. set currentVersion(String val) => _currentVersion.value = val;
  17. }