BtcDevice class Models
Represents a Bluetooth Classic remote device.
Contains device information obtained from discovery or paired device queries.
| Property | Android | Windows | macOS | Linux | iOS |
|---|---|---|---|---|---|
| address | Yes MAC | Yes MAC | Yes MAC | Yes MAC | ⚠️ serial/ID |
| name | Yes | Yes | Yes | Yes | Yes |
| alias | Yes API 30+ | No | No | Yes | No |
| rssi | Yes | No | Yes | Yes | No |
| type | Yes | No | No | No | No |
| bondState | Yes | Yes | Yes | Yes | Yes (always bonded) |
| uuids | Yes | Yes | Yes | Yes | ⚠️ protocol strings |
Constructors
-
BtcDevice({required String address, String? name, String? alias, int? rssi, BtcDeviceType type = BtcDeviceType.unknown, BtcBondState bondState = BtcBondState.none, List<
String> uuids = const []}) -
const
- BtcDevice.fromMap(Map map)
-
Creates a BtcDevice from a platform channel map.
factory
Properties
- address → String
-
The hardware address of the device.
final
- alias → String?
-
The locally set alias name, if available.
final
- bondState → BtcBondState
-
The current bond/pairing state.
final
- displayName → String
-
Returns the best available display name for this device.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String?
-
The broadcasted friendly name of the device, or null if unknown.
final
- rssi → int?
-
Signal strength in dBm, reported during discovery.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → BtcDeviceType
-
The type of Bluetooth device.
final
-
uuids
→ List<
String> -
Service UUIDs advertised by the device.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts this device to a map for platform channel communication.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override