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