BluetoothDevice.fromMap constructor

BluetoothDevice.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory BluetoothDevice.fromMap(Map<String, dynamic> map) {
  return BluetoothDevice(
    name: map['name'] ?? '',
    address: map['address'] ?? '',
    isConnected: map['isConnected'] ?? false,
    rssi: map['rssi'] ?? 0,
    deviceClass: map['deviceClass'],
  );
}