title: Does setState() trigger itself when variables and data change just like stream and streambuilder does?
body: <pre><code>class _LocationScreenState extends State&lt;LocationScreen&gt; {
  WeatherModel weather = WeatherModel();
  
  
  String weatherMessage;
  String weatherIcon;
  String cityName;
  int temperature;
  
  @override
  void initState() {
  super.initState();
  updateUI(widget.locationWeather);
  }
  
  void updateUI(dynamic weatherData) {
  setState(() {
  temperature=weatherData['main']['temp'].toInt();
  var condition = weatherData['weather'][0]['id'];
  
  cityName=weatherData['name'];
  weatherIcon=weather.getWeatherIcon(condition);
  weatherMessage=weather.getMessage(temperature);
  });
  
  }
  </code></pre>
  
  <p>Hi I am getting confused with what setState() does. If the value of temperature or condition or anything changes inside that of setState does setState() trigger itself to update the UI and build UI with updated temp or condition or do I have to invoke updateUI function myself to invoke setState and update the UI?</p>