title: Understanding Flutter Render Engine
body: <p>The docs <a href="https://flutter.io/docs/get-started/flutter-for/android-devs#how-do-i-update-listviews-dynamically" rel="noreferrer">here</a> about how to update a <code>ListView</code> say:</p>
  
  <blockquote>
    <p>In Flutter, if you were to update the list of widgets inside a
    setState(), you would quickly see that your data did not change
    visually. This is because when setState() is called, the Flutter
    rendering engine looks at the widget tree to see if anything has
    changed. When it gets to your ListView, it performs a == check, and
    determines that the two ListViews are the same. Nothing has changed,
    so no update is required.</p>
    
    <p>For a simple way to update your ListView, create a new List inside of
    setState(), and copy the data from the old list to the new list.</p>
  </blockquote>
  
  <p>I don't get how the Render Engine determines if there are any changes in the Widget Tree in this case.</p>
  
  <p>AFAICS, we care calling <code>setState</code>, which marks the <code>State</code> object as dirty and asks it to rebuild. Once it rebuilds there will be a new <code>ListView</code>, won't it? So how come the <code>==</code> check says it's the same object? </p>
  
  <p>Also, the new <code>List</code> will be internal to the <code>State</code> object, does the Flutter engine compare all the objects inside the <code>State</code> object? I thought it only compared the <code>Widget</code> tree. </p>
  
  <p>So, basically I don't understand how the Render Engine decides what it's going to update and what's going to ignore, since I can't see how creating a new <code>List</code> sends any information to the Render Engine, as the docs says the Render Engine just looks for a new <code>ListView</code>... And AFAIK a new <code>List</code> won't create a new <code>ListView</code>. </p>