| 12345678910111213141516 |
- /// A Bluetooth Classic device already paired with the tablet.
- class BluetoothDeviceInfo {
- const BluetoothDeviceInfo({required this.name, required this.address});
- final String name;
- final String address;
- factory BluetoothDeviceInfo.fromMap(Map<dynamic, dynamic> map) {
- return BluetoothDeviceInfo(
- name: (map['name'] as String?)?.trim() ?? 'Unknown device',
- address: (map['address'] as String?) ?? '',
- );
- }
- String get label => name.isEmpty ? address : '$name · $address';
- }
|