getDevicesInGroup method

Future<List<Device>> getDevicesInGroup(
  1. String sdkId,
  2. String groupId,
  3. List<String>? deviceIds
)

Implementation

Future<List<Device>> getDevicesInGroup(String sdkId, String groupId, List<String>? deviceIds) async {
	final res = await _methodChannel.invokeMethod<String>(
		'DeviceApi.getDevicesInGroup',
		{
			"sdkId": sdkId,
			"groupId": jsonEncode(groupId),
			"deviceIds": jsonEncode(deviceIds?.map((x0) => x0).toList()),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method getDevicesInGroup");
	final parsedResJson = jsonDecode(res);
	return (parsedResJson as List<dynamic>).map((x1) => Device.fromJSON(x1) ).toList();
}