getDevice method

Future<Device> getDevice(
  1. String sdkId,
  2. String deviceId
)

Implementation

Future<Device> getDevice(String sdkId, String deviceId) async {
	final res = await _methodChannel.invokeMethod<String>(
		'DeviceApi.getDevice',
		{
			"sdkId": sdkId,
			"deviceId": jsonEncode(deviceId),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getDevice");
	final parsedResJson = jsonDecode(res);
	return Device.fromJSON(parsedResJson);
}