BluetoothDevice.fromMap constructor
BluetoothDevice.fromMap(
- Map map
Creates BluetoothDevice from Map
Implementation
factory BluetoothDevice.fromMap(Map<dynamic, dynamic> map) {
return BluetoothDevice(
name: map['name'] as String?,
address: map['address'] as String,
type: BluetoothDeviceType.fromInt(map['type'] as int?),
bondState: BluetoothBondState.fromInt(map['bondState'] as int?),
isConnected: map['isConnected'] as bool? ?? false,
);
}