signIn static method
Obtains the Health Kit permissions from the user by the defined List of Scopes.
Implementation
static Future<AuthHuaweiId?> signIn(
List<Scope> scopes,
) async {
List<String> scopeStrList = <String>[];
for (Scope scope in scopes) {
scopeStrList.add(scope.scopeStr);
}
final String? result = await _channel.invokeMethod<String?>(
'signIn',
<String, dynamic>{
'scopes': scopeStrList,
},
);
if (result == null) {
return null;
}
return AuthHuaweiId.fromMap(jsonDecode(result));
}