BluetoothDevice.fromMap constructor

BluetoothDevice.fromMap(
  1. Map map
)

Implementation

factory BluetoothDevice.fromMap(Map map) => BluetoothDevice._(
    name: map["name"],
    alias: map["alias"],
    address: map["address"]!,
    type: BluetoothDeviceType.values.firstWhere(
        (e) => e.name == map["deviceType"],
        orElse: () => BluetoothDeviceType.unknown),
    rssi: map["rssi"],
    bondState: BluetoothBondState.values.firstWhere(
        (e) => e.name == map["bondState"],
        orElse: () => BluetoothBondState.none));