fromNative static method

List<MoveDevice> fromNative(
  1. dynamic devices
)

Implementation

static List<MoveDevice> fromNative(devices) {
  List<MoveDevice> deviceList = [];
  for (var device in devices) {
    String name = device["name"];
    String data = device["data"];
    bool isConnected = device["isConnected"];

    deviceList.add(MoveDevice(name, data, isConnected));
  }
  return deviceList;
}