24 lines
734 B
Dart
24 lines
734 B
Dart
/// DMC-eigenes, plugin-unabhaengiges Geraetemodell fuer gekoppelte
|
|
/// Bluetooth-Classic-Geraete (Doku Kommunikationsschicht Abschnitt 3.2).
|
|
/// Haelt `flutter_classic_bluetooth`-Typen aus der Oberflaeche heraus, damit
|
|
/// nur transport/bluetooth/ das Paket kennen muss.
|
|
class BluetoothDeviceInfo {
|
|
const BluetoothDeviceInfo({required this.address, this.name});
|
|
|
|
final String address;
|
|
final String? name;
|
|
|
|
String get displayName => name ?? address;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is BluetoothDeviceInfo && other.address == address;
|
|
|
|
@override
|
|
int get hashCode => address.hashCode;
|
|
|
|
@override
|
|
String toString() => 'BluetoothDeviceInfo($address, $name)';
|
|
}
|