import 'package:get/get.dart';

///更新状态
class UpgradeState {
  final Rx<bool> _isForce = Rx(false);

  final Rx<String> _userCode = Rx('');
  final Rx<bool> _needUpdate = Rx(false);
  final Rx<String> _newVersion = Rx('');
  final Rx<String> _contentTip = Rx('');
  final Rx<String> _downloadUrl = Rx('');

  /// 是否强制更新
  bool get isForce => _isForce.value;
  set isForce(bool val) => _isForce(val);

  /// 用户code
  String get userCode => _userCode.value;
  set userCode(String val) => _userCode(val);

  /// 是否需要更新
  bool get needUpdate => _needUpdate.value;
  set needUpdate(bool val) => _needUpdate(val);

  /// 新版本号
  String get newVersion => _newVersion.value;
  set newVersion(String val) => _newVersion(val);

  /// 新版本提示
  String get contentTip => _contentTip.value;
  set contentTip(String val) => _contentTip(val);

  /// 新版本下载地址
  String get downloadUrl => _downloadUrl.value;
  set downloadUrl(String val) => _downloadUrl(val);
}
