I want to display the distance between the user and a restaurant. I currently have an API set up using Buildship that does the calculation and is able to return the distance between two locations.
However, the location I provide it through Flutterflow, is static - to test the function.
I need to find out how I can convert the Device Current Location to JSON and set its value somewhere, so I can use it in the API. It is the user_location variable.
The data I provide to make it work is - and which I need from the Device current Location - is:
{
"latitude": 55.6896348,
"longitude": 12.4543026
}