fromJsonToList static method

List<PairedDevice> fromJsonToList(
  1. List json
)

Implementation

static List<PairedDevice> fromJsonToList(List<dynamic> json) {
  List<PairedDevice> devices = <PairedDevice>[];
  for (int i = 0; i < json.length; i++) {
    devices.add(PairedDevice(
        name: json[i]['name'],
        hardwareAddress: json[i]['hardwareAddress'],
        socketId: json[i]['socketId']));
  }
  return devices;
}