Help with Custom Marker Images Based on User Comparison in Google Maps

Actions & Logic

Hello FlutterFlow Community,

I am working on a project where I'm using the Google Maps widget integrated with a Firestore collection named "places." Each place has a field placeReqRef which is a reference to a user document.

I am displaying multiple markers on the map for each place, and I want to customize the marker image based on the following conditions:

  • If the placeReqRef is equal to the current authenticated user user.uid , then the marker should use ImageA.

  • Otherwise, it should display ImageB.

I've tried to implement this in the FlutterFlow UI, but I'm having difficulty making it work.

Here are the fields and the relevant collections:

Could anyone guide me on how to dynamically change the marker image based on whether the placeReqRef matches the current user?

Any help or pointers to where I might be going wrong would be greatly appreciated!

Thank you!

What have you tried so far?

I am currently loading the markers directly from my "places" collection and trying to use a conditions for the network path to the image but I'm not sure if this is a good approach.

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