mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
fix: Update import path for AppLocalizations in CompassSarList widget
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
|
||||
enum MapLayerType {
|
||||
openStreetMap,
|
||||
openTopoMap,
|
||||
@@ -19,6 +22,19 @@ class MapLayer {
|
||||
required this.maxZoom,
|
||||
});
|
||||
|
||||
/// Get localized name for the layer
|
||||
String getLocalizedName(BuildContext context) {
|
||||
final localizations = AppLocalizations.of(context)!;
|
||||
switch (type) {
|
||||
case MapLayerType.openStreetMap:
|
||||
return localizations.openStreetMap;
|
||||
case MapLayerType.openTopoMap:
|
||||
return localizations.openTopoMap;
|
||||
case MapLayerType.esriWorldImagery:
|
||||
return localizations.esriSatellite;
|
||||
}
|
||||
}
|
||||
|
||||
static const openStreetMap = MapLayer(
|
||||
type: MapLayerType.openStreetMap,
|
||||
name: 'OpenStreetMap',
|
||||
|
||||
Reference in New Issue
Block a user