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