widgets/map/place_save_handler library

Place save handler for optimistic saving with background updates.

Copyright (C) 2025-2026, Software Innovation Institute, ANU.

Licensed under the GNU General Public License, Version 3 (the "License").

License: https://opensource.org/license/gpl-3-0.

Functions

performBackgroundSave(Place originalPlace, BuildContext context, {bool encrypted = false}) Future<Place?>
Performs background save of a place with address lookup. Note: Context is passed through to PlacesService which handles mounted checks internally. If encrypted is true, saves to encrypted storage.
showAddPlaceDialogIfLoggedIn({required BuildContext context, double? latitude, double? longitude}) Future<AddPlaceResult?>
Shows the add place dialog and returns the result. Returns null if user is not logged in or cancels. Returns AddPlaceResult with place and encryption flag.
showSaveErrorSnackbar(BuildContext context, dynamic error) → void
Shows an error snackbar when save fails.
showSaveSuccessSnackbar(BuildContext context) → void
Shows a success snackbar after place is saved.
showSavingSnackbar(BuildContext context, Place place) → void
Shows a saving snackbar for optimistic save.
zoomIn(MapController mapController) → void
Zoom in the map by a fixed amount.
zoomOut(MapController mapController) → void
Zoom out the map by a fixed amount.