I have a statfull class called 'Location' which get the location with Geolocatar and Im showing the location with this :
Text(currentPosition!=null? '$currentPosition' : '----',),
and this is :
static Position? currentPosition;
and I have another class called 'WeatherApi' which Im using Openweathermap Api to get the weather . now I want to use the currentPosition in the api url
https://api.openweathermap.org/data/2.5/weather?lat=44.34&lon=10.99&appid={API key}
how can I use the currentPosition in the url? I have tried widget.variablename but didn't work