Location overview screen and model changes #3

Merged
marco merged 9 commits from development into main 2026-06-19 14:03:45 +02:00
Showing only changes of commit 9d0cb7668d - Show all commits
@@ -26,6 +26,16 @@ class LocationController extends ChangeNotifier {
return _repository.deleteLocation(location);
}
Future<void> updateLocation(Location oldLocation, Location newLocation) {
final index = _locations.indexOf(oldLocation);
_locations.remove(oldLocation);
_locations.insert(index, newLocation);
notifyListeners();
return _repository
.deleteLocation(oldLocation)
.whenComplete(() => _repository.createLocation(newLocation));
}
Future<void> _loadLocations() {
_locations.clear();
return _repository.loadLocations().then(