I'm stuck trying to figure out how to do this. Here's what I want to do:
When the map moves, run a custom function/action to compare loc_start (app state based on user's location) with new map center.
If new map center is over XX miles away, load more places from Firestore.
The problem is there's no action trigger for "On Map Move" or anything, just "On Marker Tap".
Thoughts so far:
Periodic Action: I could start this at page load and compare start_loc and current map center. Not ideal, most of the times I won't need to re-load places so don't want something running every few seconds that's rarely used. If I set it higher to like 15 seconds or whatever, there will be a delay.
"Update Page On Map Move" setting for the GoogleMaps widget: Not sure how I can capture this and use it in this case to run something.
Custom Widget: make a copy of the GoogleMaps widget and figure out how to add the On Map Move action trigger. Or similarly use the GoogleMap package from pub.dev and figure out how to add the action to it.
Any ideas on how I can do this? Ideally without the custom widget.
Thanks,
Craig