fix StadiaMaps Dark and add demo.

This commit is contained in:
ericz
2026-06-13 20:01:43 +02:00
parent f548f95e29
commit ecde5e1109
3 changed files with 68 additions and 21 deletions
+13
View File
@@ -76,6 +76,8 @@ class Cyr2LatProfile {
class AppSettings {
static const Object _unset = Object();
static const String stadiaDemo =
'51bd0381-4685-4666-bae8-48940f6d77c0';
final bool clearPathOnMaxRetry;
final bool mapShowRepeaters;
@@ -125,6 +127,17 @@ class AppSettings {
final List<Cyr2LatProfile> cyr2latProfiles;
final String selectedCyr2latProfileId;
String get effectiveMapTileApiKey {
final apiKey = mapTileApiKey?.trim();
if (apiKey == null || apiKey.isEmpty) {
return stadiaDemo;
}
return apiKey;
}
bool get usesstadiaDemo =>
effectiveMapTileApiKey == stadiaDemo;
Map<String, String> get cyr2latCharMap {
final profile = cyr2latProfiles.firstWhere(
(p) => p.id == selectedCyr2latProfileId,