Flutter UI Widgets, Episode 7: Use the FutureBuilder Widget | raywenderlich.com

Learn how to use the FutureBuilder widget to display content gotten from an asynchronous task like fetching data online.

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/26933987-flutter-ui-widgets/lessons/7

I noticed that the ListView.builder is still using the articles variable at the end, should be using the response from the future builder?

1 Like

Thanks for spotting that.
Yes, you’re correct.
I missed changing those parts.

The ListView should use the data from the snapshot.
So it should look like this:

return ListView.builder(
  itemCount: snapshot.data!.length,
  itemBuilder: (BuildContext context, int index) {
    return ArticleCard(article: snapshot.data[index]);

Added this to the author note and would update the download materials in coming days.

Thanks once again :]