Locations persist. Leaflet and Rest queries
This commit is contained in:
parent
7fbe5b971d
commit
b5b8b3da51
13 changed files with 196 additions and 192 deletions
|
|
@ -5,6 +5,10 @@ final String locationKey = 'yourlocations';
|
|||
|
||||
void loadYourLocations(prefs) {
|
||||
List<String> yourLocations = prefs.getStringList(locationKey);
|
||||
if (yourLocations == null) {
|
||||
yourLocations = [];
|
||||
persistYourLocations(prefs);
|
||||
}
|
||||
yourLocations.forEach((locationString) {
|
||||
Map locationMap = json.decode(locationString);
|
||||
globals.yourLocations.add(BasicLocation.fromJson(locationMap));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue