signIn static method

Future<AuthHuaweiId?> signIn(
  1. List<Scope> scopes
)

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));
}