1.修复锁版连接app提示pwd问题
2.修复小米手机输入密码问题
This commit is contained in:
parent
f05e8fc813
commit
e47a22a53f
@ -54,7 +54,6 @@ class SaveLockLogic extends BaseGetXController {
|
||||
|
||||
// 新增----m 获取锁管理员密码
|
||||
Future<void> _replySenderReadAdminPasswordReply(Reply reply) async {
|
||||
AppLog.log('响应获取管理员密码: ${reply.data}');
|
||||
var token = reply.data.sublist(5, 9);
|
||||
var saveStrList = changeIntListToStringList(token);
|
||||
Storage.setStringList(saveBlueToken, saveStrList);
|
||||
@ -153,6 +152,13 @@ class SaveLockLogic extends BaseGetXController {
|
||||
Storage.setStringList(saveBlueToken, strTokenList);
|
||||
|
||||
final int status = reply.data[46];
|
||||
if(state.adminPassword == ''){
|
||||
final Random rng = Random();
|
||||
final int number = rng.nextInt(900000) + 100000;
|
||||
state.adminPassword = number.toString();
|
||||
} else {
|
||||
state.role = 1;
|
||||
}
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
//成功 如果成功保存用户编号
|
||||
|
||||
@ -61,7 +61,6 @@ class _LoginInputState extends State<LoginInput> {
|
||||
}
|
||||
|
||||
Widget androidView() {
|
||||
final TextEditingController _controller = TextEditingController();
|
||||
bool isPwd = widget.isPwd ?? false;
|
||||
String pwd = (widget.controller?.text ?? '').replaceAll(RegExp(r'.'), '●');
|
||||
return Container(
|
||||
@ -86,10 +85,6 @@ class _LoginInputState extends State<LoginInput> {
|
||||
controller: widget.controller,
|
||||
focusNode: widget.focusNode,
|
||||
onChanged: (String text) {
|
||||
_controller.text = text;
|
||||
_controller.selection = TextSelection.fromPosition(
|
||||
TextPosition(offset: _controller.text.length),
|
||||
);
|
||||
if (widget.onchangeAction != null) {
|
||||
widget.onchangeAction!(text);
|
||||
}
|
||||
@ -99,15 +94,14 @@ class _LoginInputState extends State<LoginInput> {
|
||||
autofocus: false,
|
||||
inputFormatters: widget.inputFormatters,
|
||||
textInputAction: TextInputAction.next,
|
||||
keyboardType: isPwd ? TextInputType.emailAddress : null,
|
||||
style: isPwd
|
||||
? TextStyle(
|
||||
keyboardType: isPwd ? TextInputType.visiblePassword : null,
|
||||
obscureText: isPwd, // 使用系统自带的密码遮盖功能
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: Colors.transparent,
|
||||
letterSpacing: 2.5,
|
||||
color: AppColors.darkGrayTextColor, // 不再使用透明色
|
||||
letterSpacing: 2.0,
|
||||
fontFamily: 'Monospace',
|
||||
)
|
||||
: null,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
@ -127,20 +121,6 @@ class _LoginInputState extends State<LoginInput> {
|
||||
: null,
|
||||
),
|
||||
),
|
||||
if (isPwd)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: F.sw(skyCall: () => 27.h, xhjCall: () => widget.isLogin! ? 27.h : 39.h)),
|
||||
child: Text(
|
||||
pwd,
|
||||
style: TextStyle(
|
||||
fontSize: 22.sp,
|
||||
color: AppColors.darkGrayTextColor,
|
||||
letterSpacing: 2.0,
|
||||
fontFamily: 'Monospace',
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user