getTokenInAllGroups method

Future<List<TokenWithGroup>> getTokenInAllGroups(
  1. String sdkId,
  2. String userIdentifier,
  3. String key,
  4. String? token,
  5. int? tokenValidity,
)

Implementation

Future<List<TokenWithGroup>> getTokenInAllGroups(String sdkId, String userIdentifier, String key, String? token, int? tokenValidity) async {
	final res = await _methodChannel.invokeMethod<String>(
		'UserApi.getTokenInAllGroups',
		{
			"sdkId": sdkId,
			"userIdentifier": jsonEncode(userIdentifier),
			"key": jsonEncode(key),
			"token": jsonEncode(token),
			"tokenValidity": jsonEncode(tokenValidity),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getTokenInAllGroups");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as List<dynamic>).map((x1) => TokenWithGroup.fromJSON(x1) ).toList();
}