getOperationToken method

Future<String> getOperationToken(
  1. String sdkId,
  2. Operation operation,
  3. int? duration,
  4. String? description,
)

Implementation

Future<String> getOperationToken(String sdkId, Operation operation, int? duration, String? description) async {
	final res = await _methodChannel.invokeMethod<String>(
		'GroupApi.getOperationToken',
		{
			"sdkId": sdkId,
			"operation": jsonEncode(Operation.encode(operation)),
			"duration": jsonEncode(duration),
			"description": jsonEncode(description),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getOperationToken");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as String);
}