bluetooth connectivity layer added
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/// 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)';
|
||||
}
|
||||
Reference in New Issue
Block a user