getDefaultRoles method

Future<Map<UserType, List<RoleConfiguration>>> getDefaultRoles(
  1. String sdkId,
  2. String groupId
)

Implementation

Future<Map<UserType, List<RoleConfiguration>>> getDefaultRoles(String sdkId, String groupId) async {
	final res = await _methodChannel.invokeMethod<String>(
		'GroupApi.getDefaultRoles',
		{
			"sdkId": sdkId,
			"groupId": jsonEncode(groupId),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getDefaultRoles");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as Map<String, dynamic>).map((k1, v1) => MapEntry(UserType.fromJSON(k1), (v1 as List<dynamic>).map((x2) => RoleConfiguration.fromJSON(x2) ).toList()));
}