getTokenInGroup method

Future<String> getTokenInGroup(
  1. String sdkId,
  2. String groupId,
  3. String userId,
  4. String key,
  5. String? token,
  6. int? tokenValidity,
)

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