This commit is contained in:
v7lin
2022-03-29 10:44:52 +08:00
parent d8f5f0bf8e
commit d18ae78fe6

@ -33,14 +33,14 @@ class Home extends StatefulWidget {
} }
class _HomeState extends State<Home> { class _HomeState extends State<Home> {
late final StreamSubscription<BaseResp> _respSubs = late final StreamSubscription<BaseResp> _respSubs;
Tencent.instance.respStream().listen(_listenLogin);
LoginResp? _loginResp; LoginResp? _loginResp;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_respSubs = Tencent.instance.respStream().listen(_listenLogin);
} }
void _listenLogin(BaseResp resp) { void _listenLogin(BaseResp resp) {