Google Map widget New Map Center action not running consistently

Actions & Logic

Hello everyone,

First of all thank you for your time, I don't usually ask for help but this time I feel desperate.

I have one page (a form) where the user can fill some input fields to register a location. Inside this form I created a functionality where the user can see and modify the "LatLong". Let me show you:

In the form the user see the Google Map Widget (which Initial Map Center is the user's current location) and a button that says "Modify Location". This button should be clicked if the user doesn't want to save his current location but prefers to adjust it manually:

When the "Modify Location" button is clicked, a Bottom Sheet appears. In this Bottom Sheet, the red pin indicates the previous location and the green pin indicates the new location. The green pin always stays at the center of the map and moves as you move through the map since this new location will be recorded depending on the Bottom Sheet map center:

When you have the green pin in the desired position you just have to click "Confirm location", the bottom sheet closes and the center map indicated in the Bottom Sheet should be recorded and sent back to the original Google Map Widget back in the form.

In order to do that we use the following actions:

This should be pretty straight forward but I cannot make it work consistently. After debugging I now that the newLocation is always updated with the expected value but the Google Map Center back in the form is not always updated and stays the same. Sometimes it works, specially if I insert Non-Blocking Informational Dialogs between actions, but most of the times the Google Map New Map Center action never executes.

What have you tried so far?

I tried debugging, I can confirm that the newLocation is always updated with the expected value but most of the times the Google Map New Map Center action never executes.

It seems like it stops executing before the Google Map New Map Center action. I tried adding Delays to give some oxygen but it didn't worked

I tried adding additional actions and they execute if they are running before the Google Map New Map Center action, but not after. Also I tried moving the action before the conditional but nothing changed.

I tried adding Informational Dialogs that helped me confirm that the "newLocation" is being updated as expected. The informational Dialogs, if configured as Non-Blocking, sometimes helped increase the consistency (seems like they give the Google Map New Map Center action some space to execute in the background) but after some tests I always get like 50% tries not working.

Did you check FlutterFlow's Documentation for this topic?
Yes
2
1 reply