chore: add high level classes

Signed-off-by: The one with the braid <the-one@with-the-braid.cf>
This commit is contained in:
The one with the braid 2023-08-27 17:47:11 +02:00
parent 165226bee1
commit 78f88305ec
13 changed files with 678 additions and 316 deletions

View file

@ -0,0 +1,30 @@
/// Information about a location beacon.
class Beacon {
/// Unique identifier of a Bluetooth Low Energy location beacon.
final String proximityUUID;
/// Major identifier of a Bluetooth Low Energy location beacon.
final double? major;
/// Minor identifier of a Bluetooth Low Energy location beacon.
final double? minor;
/// Text displayed on the lock screen when the pass is currently relevant.
/// For example, a description of the nearby location such as
/// Store nearby on 1st and Main.
final String? relevantText;
const Beacon({
required this.proximityUUID,
this.major,
this.minor,
this.relevantText,
});
factory Beacon.fromJson(Map<String, Object?> json) => Beacon(
proximityUUID: json['proximityUUID'] as String,
major: json['major'] as double?,
minor: json['minor'] as double?,
relevantText: json['relevantText'] as String?,
);
}