BmDevicesList.fromMap constructor

BmDevicesList.fromMap(
  1. Map json
)

Implementation

factory BmDevicesList.fromMap(Map<dynamic, dynamic> json) {
  // convert to BmBluetoothDevice
  List<BmBluetoothDevice> devices = [];
  for (var i = 0; i < json['devices'].length; i++) {
    devices.add(BmBluetoothDevice.fromMap(json['devices'][i]));
  }
  return BmDevicesList(devices: devices);
}