wechat_kit
wechat_kit copied to clipboard
wechat_kit 5.0.3 微信授权不成功
late final StreamSubscription<WechatResp> _respSubs;
void onInit() async { super.onInit(); _respSubs = WechatKitPlatform.instance.respStream().listen(_listenResp); } void _listenResp(WechatResp resp) { print('object--111--'); if (resp is WechatAuthResp) { print('object-2222---'); final String content = 'auth: ${resp.errorCode} ${resp.errorMsg}'; print('登录----$content'); } }
调用bindWechat(){ WechatKitPlatform.instance.auth( scope: <String>[WechatScope.kSNSApiUserInfo], state: 'auth', ); } 但是这个监听没有被调用respStream().listen
iOS授权不行但是分享可以,安卓都ok的,