authWeChatByQRCode function
Sometimes WeChat is not installed on users's devices.However we can
request a QRCode so that we can get AuthCode by scanning the QRCode
All required params must not be null or empty
schemeData
only works on iOS
see * https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=215238808828h4XN&token=&lang=zh_CN
Implementation
Future<bool> authWeChatByQRCode({
required String appId,
required String scope,
required String nonceStr,
required String timeStamp,
required String signature,
String? schemeData,
}) async {
assert(appId.isNotEmpty);
assert(scope.isNotEmpty);
assert(nonceStr.isNotEmpty);
assert(timeStamp.isNotEmpty);
assert(signature.isNotEmpty);
return await _channel.invokeMethod('authByQRCode', {
'appId': appId,
'scope': scope,
'nonceStr': nonceStr,
'timeStamp': timeStamp,
'signature': signature,
'schemeData': schemeData
});
}