Widget build(context) { try{ if (isFirst == true) { fetchImage(); fetchCategories(context); isFirst = false; } }catch(Excepti
Make sure specifying the length of the list of data. For example, if you're using ListView.builder give proper value to the attribute itemCount.
ListView.builder
itemCount
ListView.builder( itemCount: snapshot.data.length, itemBuilder: (ctx, index) { return WidgetItem(); });