auth method
授权登录
Implementation
@override
Future<void> auth({
required List<String> scope,
String? state,
int type = WechatAuthType.kNormal,
}) {
assert((Platform.isAndroid && type == WechatAuthType.kNormal) ||
(Platform.isIOS &&
<int>[WechatAuthType.kNormal, WechatAuthType.kWeb].contains(type)));
return methodChannel.invokeMethod<void>('auth', <String, dynamic>{
'scope': scope.join(','), // Scope
if (state != null) 'state': state,
'type': type,
});
}