53 lines
1.4 KiB
Dart
Executable File
53 lines
1.4 KiB
Dart
Executable File
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../translations/current_locale_tool.dart';
|
|
|
|
class StarLockLoginState {
|
|
StarLockLoginState() {
|
|
// emailOrPhone.value = StoreService.to.getLastUserAccount() as String;
|
|
emailOrPhoneController.text = emailOrPhone.value;
|
|
}
|
|
RxBool passwordShow = true.obs;
|
|
RxBool agree = false.obs;
|
|
|
|
RxString countryCode = '86'.obs;
|
|
RxString countryKey = '中国'.tr.obs;
|
|
|
|
/// 获取翻译后的国家名称
|
|
String get countryName => countryKey.value.tr;
|
|
|
|
///
|
|
bool get isChina {
|
|
if (CurrentLocaleTool.convertLocale(Get.deviceLocale!) ==
|
|
const Locale('zh', 'CN')) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
RxString emailOrPhone = ''.obs;
|
|
RxString pwd = ''.obs;
|
|
RxBool canNext = false.obs;
|
|
bool get isEmailOrPhone => emailOrPhone.value.isNotEmpty;
|
|
bool get pwdIsOK => pwd.value.isNotEmpty;
|
|
|
|
TextEditingController emailOrPhoneController = TextEditingController();
|
|
TextEditingController pwdController = TextEditingController();
|
|
|
|
FocusNode emailOrPhoneFocusNode = FocusNode();
|
|
FocusNode pwdFocusNode = FocusNode();
|
|
RxMap<String, dynamic> deviceInfoMap = <String, dynamic>{
|
|
'deviceBrand': '暂无',
|
|
'deviceModel': '暂无',
|
|
'deviceVersion': '暂无',
|
|
'deviceType': 0
|
|
}.obs;
|
|
|
|
void onClose() {
|
|
// emailOrPhoneController.dispose();
|
|
// pwdController.dispose();
|
|
}
|
|
}
|