Fix bug on map-click #62

Merged
adsu7578 merged 1 commits from final into master 2022-06-04 08:10:03 +02:00
2 changed files with 5 additions and 7 deletions
Showing only changes of commit f87dc614a7 - Show all commits

View File

@ -21,7 +21,7 @@ void main() async {
await Firebase.initializeApp(); await Firebase.initializeApp();
await loadAllVenues(); await loadAllVenues();
await fetchWeather(); await fetchWeather();
await weatherInstance(); // await weatherInstance();
await loadAllVenuesSQL(); await loadAllVenuesSQL();
runApp(MyApp()); runApp(MyApp());

View File

@ -26,7 +26,7 @@ final homeScaffoldKey = GlobalKey<ScaffoldState>();
late CameraPosition _currentCameraPosition; late CameraPosition _currentCameraPosition;
class MapState extends State<Map> { class MapState extends State<Map> {
bool _bottomSheetIsOpen = false; // bool _bottomSheetIsOpen = false;
final Completer<GoogleMapController> _controller = Completer(); final Completer<GoogleMapController> _controller = Completer();
bool? _barFilterValue = true; bool? _barFilterValue = true;
@ -143,7 +143,7 @@ class MapState extends State<Map> {
}, },
markers: closeByMarkersList.map((e) => e).toSet(), markers: closeByMarkersList.map((e) => e).toSet(),
onTap: (LatLng) { onTap: (LatLng) {
closeBottomSheetIfOpen(); // closeBottomSheetIfOpen();
}, },
), ),
], ],
@ -334,7 +334,6 @@ class MapState extends State<Map> {
} }
createBottomSheet(Venue venue) async { createBottomSheet(Venue venue) async {
_bottomSheetIsOpen = true;
// Scaffold.of(context).showBottomSheet<void>(((context) { // Scaffold.of(context).showBottomSheet<void>(((context) {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
@ -425,7 +424,6 @@ class MapState extends State<Map> {
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(
context, MaterialPageRoute(builder: (context) => VenuePage(venue))); context, MaterialPageRoute(builder: (context) => VenuePage(venue)));
_bottomSheetIsOpen = false;
}, },
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
primary: globals.BUTTONCOLOR, primary: globals.BUTTONCOLOR,
@ -458,12 +456,12 @@ class MapState extends State<Map> {
); );
} }
closeBottomSheetIfOpen() { /* closeBottomSheetIfOpen() {
if (_bottomSheetIsOpen) { if (_bottomSheetIsOpen) {
Navigator.pop(context); Navigator.pop(context);
_bottomSheetIsOpen = false; _bottomSheetIsOpen = false;
} }
} }*/
void setAllMarkersAsInvisible() { void setAllMarkersAsInvisible() {
for (Venue venue in hiddenVenues) { for (Venue venue in hiddenVenues) {