feat: add more easter eggs

This commit is contained in:
2026-10-26 23:54:06 +01:00
parent 08f4847800
commit 4d9ba67eb1
18 changed files with 695 additions and 36 deletions
+22
View File
@@ -104,6 +104,28 @@ class RemoteSyncService {
/// Null for devices linked before the name was kept.
Future<String?> get venueName => secureStorage.read(key: _venueNameKey);
/// Looks up and keeps the venue's name for a device linked before the
/// name was kept. Null when it can't be found, e.g. while offline.
Future<String?> fetchVenueName() async {
final venueId = await this.venueId;
if (venueId == null) return null;
try {
final venues = await apiClient.getVenues();
final name = venues
.where((venue) => venue.id == venueId)
.firstOrNull
?.name;
if (name != null) {
await secureStorage.write(key: _venueNameKey, value: name);
}
return name;
} on Exception catch (e) {
debugPrint('RemoteSyncService: fetchVenueName error: $e');
return null;
}
}
Future<bool> get isConfigured async => await _credentials() != null;
Future<String?> get authToken async => (await _credentials())?.token;