fix:调整出现一键登录的问题
This commit is contained in:
parent
02d0bc49d3
commit
2e340921c1
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/apm/apm_helper.dart';
|
import 'package:star_lock/apm/apm_helper.dart';
|
||||||
@ -174,8 +176,10 @@ class StarLockLoginLogic extends BaseGetXController {
|
|||||||
state.canNext.value = state.pwdIsOK && state.isEmailOrPhone;
|
state.canNext.value = state.pwdIsOK && state.isEmailOrPhone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
late StreamSubscription _agreePrivacySubscription;
|
||||||
|
|
||||||
void _initEventListen() {
|
void _initEventListen() {
|
||||||
eventBus
|
_agreePrivacySubscription = eventBus
|
||||||
.on<AgreePrivacyAgreement>()
|
.on<AgreePrivacyAgreement>()
|
||||||
.listen((AgreePrivacyAgreement event) async {
|
.listen((AgreePrivacyAgreement event) async {
|
||||||
await JverifyOneClickLoginManage();
|
await JverifyOneClickLoginManage();
|
||||||
@ -194,6 +198,8 @@ class StarLockLoginLogic extends BaseGetXController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
|
// 取消事件监听
|
||||||
|
_agreePrivacySubscription.cancel();
|
||||||
state.onClose();
|
state.onClose();
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user