Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SetState () #27

Open
uj2208 opened this issue Feb 14, 2021 · 1 comment
Open

Use SetState () #27

uj2208 opened this issue Feb 14, 2021 · 1 comment

Comments

@uj2208
Copy link

uj2208 commented Feb 14, 2021

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,
                ),
              ),
@JAZZKIT
Copy link

JAZZKIT commented May 26, 2021

Thanks for that. Also, you have to use the same construction with getCityWeatherData.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants