fromNative static method

List<MoveScanResult> fromNative(
  1. dynamic results
)

Implementation

static List<MoveScanResult> fromNative(results) {
  List<MoveScanResult> moveResults = [];
  for (var result in results) {
    String name = result["name"];
    String data = result["device"];
    bool isDiscovered = result["isDiscovered"];
    moveResults
        .add(MoveScanResult(isDiscovered, MoveDevice(name, data, true)));
  }
  return moveResults;
}