getTokenInGroup method
Implementation
Future<String> getTokenInGroup(String sdkId, String groupId, String userId, String key, String? token, int? tokenValidity) async {
final res = await _methodChannel.invokeMethod<String>(
'UserApi.getTokenInGroup',
{
"sdkId": sdkId,
"groupId": jsonEncode(groupId),
"userId": jsonEncode(userId),
"key": jsonEncode(key),
"token": jsonEncode(token),
"tokenValidity": jsonEncode(tokenValidity),
}
);
if (res == null) throw AssertionError("received null result from platform method getTokenInGroup");
final parsedResJson = jsonDecode(res);
return (parsedResJson as String);
}