Use SetState ()
uj2208 opened this issue · comments
For dynamically changing the content of the location screen use set state() for getting weather details city wise
FlatButton(
onPressed: () async {
//WeatherModel modelx1 = WeatherModel();
var weatherData = await model.getlocationweather();
setState(() {
updateUI(weatherData);
});
},
child: Icon(
Icons.near_me,
size: 30.0,
),
),
Thanks for that. Also, you have to use the same construction with getCityWeatherData.