From f87dc614a71d680255bf20c6731b7ab18cea6be6 Mon Sep 17 00:00:00 2001 From: Adam Sundberg Date: Sat, 4 Jun 2022 08:08:22 +0200 Subject: [PATCH] Fix bug on map-click --- lib/main.dart | 2 +- lib/map.dart | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index a8497ba..455b35a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -21,7 +21,7 @@ void main() async { await Firebase.initializeApp(); await loadAllVenues(); await fetchWeather(); - await weatherInstance(); + // await weatherInstance(); await loadAllVenuesSQL(); runApp(MyApp()); diff --git a/lib/map.dart b/lib/map.dart index 9275d0f..9e2583d 100644 --- a/lib/map.dart +++ b/lib/map.dart @@ -26,7 +26,7 @@ final homeScaffoldKey = GlobalKey(); late CameraPosition _currentCameraPosition; class MapState extends State { - bool _bottomSheetIsOpen = false; + // bool _bottomSheetIsOpen = false; final Completer _controller = Completer(); bool? _barFilterValue = true; @@ -143,7 +143,7 @@ class MapState extends State { }, markers: closeByMarkersList.map((e) => e).toSet(), onTap: (LatLng) { - closeBottomSheetIfOpen(); + // closeBottomSheetIfOpen(); }, ), ], @@ -334,7 +334,6 @@ class MapState extends State { } createBottomSheet(Venue venue) async { - _bottomSheetIsOpen = true; // Scaffold.of(context).showBottomSheet(((context) { showModalBottomSheet( context: context, @@ -425,7 +424,6 @@ class MapState extends State { onPressed: () { Navigator.push( context, MaterialPageRoute(builder: (context) => VenuePage(venue))); - _bottomSheetIsOpen = false; }, style: ElevatedButton.styleFrom( primary: globals.BUTTONCOLOR, @@ -458,12 +456,12 @@ class MapState extends State { ); } - closeBottomSheetIfOpen() { +/* closeBottomSheetIfOpen() { if (_bottomSheetIsOpen) { Navigator.pop(context); _bottomSheetIsOpen = false; } - } + }*/ void setAllMarkersAsInvisible() { for (Venue venue in hiddenVenues) { -- 2.39.5