π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Changes to UI/UX of map
ashilkndd0463f02059
diff --git a/lib/ui/viewer/location/add_location_data_widget.dart b/lib/ui/viewer/location/add_location_data_widget.dartindex ebc1e0e0aa..ffdf51d380 100644--- a/lib/ui/viewer/location/add_location_data_widget.dart+++ b/lib/ui/viewer/location/add_location_data_widget.dart@@ -13,7 +13,8 @@ class AddLocationDataWidget extends StatefulWidget {class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {final MapController _mapController = MapController();- ValueNotifier<LatLng?> selectedLocation = ValueNotifier(null);+ LatLng? selectedLocation;+ ValueNotifier hasSelectedLocation = ValueNotifier(false);@overridevoid initState() {@@ -23,7 +24,6 @@ class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {@overridevoid dispose() {super.dispose();- selectedLocation.dispose();_mapController.dispose();}@@ -39,16 +39,17 @@ class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {maxZoom: 18.0,minZoom: 2.8,onTap: (tapPosition, latlng) {- final zoom = selectedLocation.value == null+ final zoom = selectedLocation == null? _mapController.zoom + 2.0: _mapController.zoom;_mapController.move(latlng, zoom);- selectedLocation.value = latlng;+ selectedLocation = latlng;+ hasSelectedLocation.value = true;},onPositionChanged: (position, hasGesture) {- if (selectedLocation.value != null) {- selectedLocation.value = position.center;+ if (selectedLocation != null) {+ selectedLocation = position.center;}},),@@ -63,6 +64,14 @@ class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {right: 10,child: Column(children: [+ MapButton(+ // icon: Icons.add_location_alt_outlined,+ icon: Icons.check,++ onPressed: () {},+ heroTag: 'zoom-in',+ ),+ const SizedBox(height: 16),MapButton(icon: Icons.add,onPressed: () {@@ -87,39 +96,18 @@ class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {),),ValueListenableBuilder(- valueListenable: selectedLocation,+ valueListenable: hasSelectedLocation,builder: (context, value, _) {- return value != null+ return value? const Positioned(- bottom: 20,+ bottom: 16,top: 0,left: 0,right: 0,child: Icon(Icons.location_pin,color: Color.fromARGB(255, 250, 34, 19),- size: 40,- ),- )- : const SizedBox.shrink();- },- ),- ValueListenableBuilder(- valueListenable: selectedLocation,- builder: (context, value, _) {- return value != null- ? Positioned(- left: 0,- right: 0,- child: Row(- children: [- Text(- selectedLocation.value.toString(),- style: const TextStyle(- color: Colors.black,- ),- ),- ],+ size: 32,),): const SizedBox.shrink();