This commit is contained in:
v7lin
2019-05-17 11:45:37 +08:00
parent f614b0fd37
commit cb3ae721a4
2 changed files with 4 additions and 2 deletions

View File

@ -39,6 +39,8 @@ class Home extends StatefulWidget {
}
class _HomeState extends State<Home> {
static const String TENCENT_APPID = '222222';
Tencent _tencent = Tencent();
StreamSubscription<TencentLoginResp> _login;
@ -50,7 +52,7 @@ class _HomeState extends State<Home> {
@override
void initState() {
super.initState();
_tencent.registerApp(appId: '222222');
_tencent.registerApp(appId: TENCENT_APPID);
_login = _tencent.loginResp().listen(_listenLogin);
_userInfo = _tencent.userInfoResp().listen(_listenUserInfo);
_share = _tencent.shareResp().listen(_listenShare);