mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-26 05:26:37 +10:00
Merge pull request #461 from ericszimmermann/ez_alternative_maps
Alternative Maps
This commit is contained in:
@@ -120,6 +120,25 @@ class AppSettingsService extends ChangeNotifier {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> setMapRasterSourceId(String value) async {
|
||||
await updateSettings(_settings.copyWith(mapRasterSourceId: value));
|
||||
}
|
||||
|
||||
Future<void> setMapTileEndpointId(String value) async {
|
||||
await updateSettings(_settings.copyWith(mapTileEndpointId: value));
|
||||
}
|
||||
|
||||
Future<void> setMapTileApiKey(String? value) async {
|
||||
final normalized = value?.trim();
|
||||
await updateSettings(
|
||||
_settings.copyWith(
|
||||
mapTileApiKey: (normalized == null || normalized.isEmpty)
|
||||
? null
|
||||
: normalized,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> setNotificationsEnabled(bool value) async {
|
||||
await updateSettings(_settings.copyWith(notificationsEnabled: value));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user