title: Flutter: ListView.builder inside FutureBuilder grows infinitely
body: <p>I want to fetch datas from an online open data interface and then show them on the screen using ListView.builder. So, I create a FutureBuilder which returns a ListView.builder. The data has a exact length, but the ListView seems to grow infinitely. Is there a infinity loop or any bug in FutureBuilder which caused this problem?</p>
  <p>The part of the code which caused this problem(I think):</p>
  <pre><code>Widget build(BuildContext context) {
  
      final key = utf8.encode(AppKey);
      final hmac = hmacSha1(key, utf8.encode(SignDate));
      final base64HmacString = base64Encode(hmac);
  
      final Authorization = &quot;hmac username=\&quot;&quot; + AppID + &quot;\&quot;, algorithm=\&quot;hmac-sha1\&quot;, headers=\&quot;x-date\&quot;, signature=\&quot;&quot; + base64HmacString + &quot;\&quot;&quot;;
  
      getNumData();
      for(int i = 0 ; i &lt; Numdata.length ; i++){
        if(Numdata[i]['stationName'] == DStation){
          DStationNum = Numdata[i]['stationCode'];
          break;
        }
      }
      for(int i = 0 ; i &lt; Numdata.length; i++){
        if(Numdata[i]['stationName'] == AStation){
          AStationNum = Numdata[i]['stationCode'];
          break;
        }
      }
  
      return Scaffold(
        appBar: AppBar(
          backgroundColor: Color.fromRGBO(191, 62, 255, 1),
          title: Text('火車查詢'),
        ),
        body: FutureBuilder(
            future: getTableData(Authorization, xdate, DStationNum, AStationNum),
            builder: (context, snap){
              if(!snap.hasData){
                return Container();
              }
              List&lt;dynamic&gt; datas = [];
              datas = jsonDecode(snap.data.body);
              count1++;
              print('count1: ' + count1.toString());
              for(int i = 0 ; i &lt; datas.length ; i++){
                count2++;
                print('count2: ' + count2.toString());
                Map&lt;String, dynamic&gt; DailyTrainInfo = datas[i]['DailyTrainInfo'];
                Map&lt;String, dynamic&gt; OriginStopTime = datas[i]['OriginStopTime'];
                Map&lt;String, dynamic&gt; DestinationStopTime = datas[i]['DestinationStopTime'];
                CText.add(DailyTrainInfo[&quot;TrainTypeName&quot;][&quot;Zh_tw&quot;]);
                print('CText.length: ' + CText.length.toString());
                DEPTime1Text.add(OriginStopTime[&quot;DepartureTime&quot;]);
                DEPTime2Text.add(DestinationStopTime[&quot;DepartureTime&quot;]);
                TrainText.add(DailyTrainInfo[&quot;TrainNo&quot;]);
              }
              return ListView.builder(
                shrinkWrap: true,
                itemCount: CText.length,
                itemBuilder: (context, index){
                  print('CText.length: ' + CText.length.toString());
                  count3++;
                  print('count3: ' + count3.toString());
                  return ListTile(title: Text(CText[index] + '      ' + DEPTime1Text[index] + '   =&gt;   ' + DEPTime2Text[index]), subtitle: Text(TrainText[index]),);
                },
              );
            }),
        bottomNavigationBar: BottomNavigationBar(
          onTap: onTabTapped,
          currentIndex: _currentIndex, // this will be set when a new tab is tapped
          items: [
            new BottomNavigationBarItem(
              icon: new Icon(Icons.school),
              title: new Text('大學'),
            ),
            new BottomNavigationBarItem(
              icon: new Icon(Icons.directions_subway),
              title: new Text('交通'),
            ),
            new BottomNavigationBarItem(
              icon: new Icon(Icons.person),
              title: new Text('個人'),
            )
          ],
        ),
      );
    }
  </code></pre>
  <p>The getNumData() function:</p>
  <pre><code>Future getNumData() async{
      final String hostNum = 'http://ods.railway.gov.tw/tra-ods-web/ods/download/dataResource/0518b833e8964d53bfea3f7691aea0ee';
      final response = await http.get(hostNum);
      Numdata = jsonDecode(utf8.decode(response.bodyBytes));
    }
  </code></pre>