Initial version

This commit is contained in:
2026-09-21 18:03:21 -04:00
commit e8e7dc4a81
83 changed files with 7177 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
/// A scooter candidate discovered during a BLE scan.
///
/// [id] is the platform peripheral identifier (a MAC address on Android, an
/// opaque UUID on iOS). It is only valid for connecting on this device and
/// must NOT be used as the scooter's persistent identity. Once a vendor
/// protocol exposes a serial number or UID, use that instead.
class ScooterDevice {
final String id;
final String name;
final int rssi;
/// Lowercase 128-bit service UUIDs found in the advertisement.
final Set<String> advertisedServiceUuids;
const ScooterDevice({
required this.id,
required this.name,
required this.rssi,
this.advertisedServiceUuids = const {},
});
@override
bool operator ==(Object other) => other is ScooterDevice && other.id == id;
@override
int get hashCode => id.hashCode;
@override
String toString() => 'ScooterDevice($id, "$name", $rssi dBm)';
}