BluetoothDevice class

A Bluetooth device found in a scan, as listed in Bluetooth.

Annotations
  • @JsonSerializable.new(includeIfNull: false, explicitToJson: true)

Constructors

BluetoothDevice({required String advertisementName, required String bluetoothDeviceId, required String bluetoothDeviceName, required bool connectable, required int rssi, int? txPowerLevel})
BluetoothDevice.fromJson(Map<String, dynamic> json)
factory
BluetoothDevice.fromRangingResult(Beacon result, String beaconName)
Creates a BluetoothDevice from a ranged Beacon, using beaconName as id and names.
factory
BluetoothDevice.fromScanResult(ScanResult result)
Creates a BluetoothDevice from a flutter_blue_plus ScanResult.
factory

Properties

advertisementName ↔ String
The bluetooth advertising name of the device.
getter/setter pair
bluetoothDeviceId ↔ String
The bluetooth id of the nearby device.
getter/setter pair
bluetoothDeviceName ↔ String
The bluetooth name of the nearby device.
getter/setter pair
connectable ↔ bool
Whether the device is connectable.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
rssi ↔ int
The RSSI signal strength to the device, in dBm.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
txPowerLevel ↔ int?
The advertised transmit power level, if available.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited