In Flutter, things work a little differently.
If you update the list of widgets inside a setState() method,
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.

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.
While this approach is simple, it is not recommended for large data sets,
as shown in the next example.

The recommended, efficient, and effective way to build a list
uses a ListView.Builder.
This method is great when you have a dynamic list
or a list with very large amounts of data.
This is essentially the equivalent of RecyclerView on Android,
which automatically recycles list elements for you: