ScanResult class

A scan result emitted by the scanning operation, containing BluetoothDevice and ScanRecord.

Annotations
  • @JsonSerializable.new()

Constructors

ScanResult({BluetoothDevice? device, int? eventType, int? primaryPhy, int? secondaryPhy, int? advertisingSid, int? txPower, int? rssi, int? periodicAdvertisingInterval, ScanRecord? scanRecord, int? timestampNanos, bool? connectable, int? queue})
Creates a ScanResult
ScanResult.fromJson(Map<String, dynamic> json)
Creates a ScanResult from JSON
factory
ScanResult.fromPlatform(Map<Object?, Object?> raw)
Creates a ScanResult from platform data
factory

Properties

advertisingSid int?
The advertising SID
final
connectable bool?
Whether the device is connectable
final
device BluetoothDevice?
The Bluetooth device
final
eventType int?
The event type
final
hashCode int
The hash code for this object.
no setterinherited
periodicAdvertisingInterval int?
The periodic advertising interval
final
primaryPhy int?
The primary PHY
final
queue int?
Queue size
final
rssi int?
Signal strength of the peripheral in dBm.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scanRecord ScanRecord?
The scan record
final
secondaryPhy int?
The secondary PHY
final
timestampNanos int?
The timestamp in nanoseconds
final
txPower int?
The TX power
final

Methods

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

Operators

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

Static Methods

deepCastMap(Map<Object?, Object?> raw) Map<String, dynamic>
Deep casts a map to ensure correct types