RangeError (index): Invalid value: Valid value range is empty: 0

后端 未结 8 1776
没有蜡笔的小新
没有蜡笔的小新 2021-02-12 13:26
Widget build(context) {
    try{
      if (isFirst == true) {
        fetchImage();
        fetchCategories(context);
        isFirst = false;
      }
    }catch(Excepti         


        
相关标签:
8条回答
  • 2021-02-12 13:47

    You are not getting the data. The data folder from or data source is missing. The same happened for me. Later, I created the json file for data and pointed to that location. And it got fixed simply!

    0 讨论(0)
  • 2021-02-12 13:47

    If you are fetching data from the API consider using FutureBuilder.

    0 讨论(0)
提交回复
热议问题