BluetoothDevice class Null safety

Inheritance
Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

BluetoothDevice({required String id, String? name, int? rssi, int bluetoothClass = 0, BluetoothDeviceType bluetoothType = BluetoothDeviceType.unknown})
BluetoothDevice.fromJson(Map<String, dynamic> json)
factory
BluetoothDevice.fromProto(BluetoothDevice device)
factory

Properties

bluetoothClass int
蓝牙类型(手机、耳机、打印、电脑等) BluetoothDeviceClass
final
bluetoothType BluetoothDeviceType
蓝牙类型(SPP、BLE)
final
hashCode int
The hash code for this object.
read-only, inherited
id String
蓝牙MAC地址(aa:bb:cc:dd:ee:ff)
final
name String?
蓝牙名称
final
rssi int?
信号强度
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type PrinterDeviceType
read / write, inherited

Methods

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

Operators

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