Advertisement
rajath_pai

BluetoothDiscoveryResult

Aug 4th, 2021
978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.38 KB | None | 0 0
  1. part of flutter_bluetooth_serial;
  2.  
  3. class BluetoothDiscoveryResult {
  4.   final BluetoothDevice device;
  5.   final int rssi;
  6.  
  7.   BluetoothDiscoveryResult({
  8.     required this.device,
  9.     this.rssi = 0,
  10.   });
  11.  
  12.   factory BluetoothDiscoveryResult.fromMap(Map map) {
  13.     return BluetoothDiscoveryResult(
  14.       device: BluetoothDevice.fromMap(map),
  15.       rssi: map['rssi'] ?? 0,
  16.     );
  17.   }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement