BluetoothDevice
A Bluetooth device found in a scan, as listed in Bluetooth.
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
BluetoothDevice.fromJson
BluetoothDevice.fromRangingResult
Creates a BluetoothDevice from a ranged Beacon, using beaconName as id and names.
BluetoothDevice.fromScanResult
- ScanResult result
Creates a BluetoothDevice from a flutter_blue_plus ScanResult.
BluetoothDevice
Properties
advertisementName
The bluetooth advertising name of the device.
bluetoothDeviceId
The bluetooth id of the nearby device.
bluetoothDeviceName
The bluetooth name of the nearby device.
connectable
Whether the device is connectable.
rssi
The RSSI signal strength to the device, in dBm.
txPowerLevel
The advertised transmit power level, if available.
Methods
toJson
toString
A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.