Fix bug on map-click #62
@ -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());
|
||||||
|
10
lib/map.dart
10
lib/map.dart
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user