Member-only story

Flutter Flow: Extracting Latitude and Longitude from LatLng

Christopher Coffee
3 min readMar 13, 2024

--

When dealing with Google Maps and Place Picker on Flutter Flow, there often arises a requirement to extract and store the latitude and longitude details.

These coordinates are essential for a variety of purposes, including populating your preferred database with separate columns for latitude and longitude. This process enables precise location tracking and management within your Flutter application.

Create a custom function

First, go to the Custom Code menu on the far left.

Update the function name to getCoordinate

In the function settings set the return type to a Double. Now create two arguments, coordinates of type LatLng and isLatitude of type Boolean.

Implement the function

--

--

Responses (1)