title: ListView's scroll is not smooth in Flutter project
body: <p>I just started learning Flutter. And I faced one big problem which is bad scrolling in complex list. Let's say we have 5 different item type in our ListView and some item type must display images and it's infinite scroll. I read a lot articles and posts about ListView for Flutter and all the things I've seen are simple list with text. How can I make smooth scroll?</p>
  
  <pre><code>import 'dart:async';
  
  import 'package:flutter/material.dart';
  import 'package:english_words/english_words.dart';
  
  void main() =&gt; runApp(new MyApp());
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: 'Startup Name Generator',
        home: new RandomWords(),
      );
    }
  }
  
  class RandomWords extends StatefulWidget {
    @override
    RandomWordsState createState() =&gt; new RandomWordsState();
  }
  
  class RandomWordsState extends State&lt;RandomWords&gt; {
    final List&lt;WordPair&gt; _suggestions = &lt;WordPair&gt;[];
    final TextStyle _biggerFont = const TextStyle(fontSize: 18.0);
    List&lt;int&gt; items = List.generate(10, (i) =&gt; i);
    ScrollController _scrollController = new ScrollController();
    bool isPerformingRequest = false;
  
    @override
    void initState() {
      super.initState();
      _scrollController.addListener(() {
        if (_scrollController.position.pixels ==
            _scrollController.position.maxScrollExtent) {
          _getMoreData();
        }
      });
    }
  
    @override
    void dispose() {
      _scrollController.dispose();
      super.dispose();
    }
  
    _getMoreData() async {
      if (!isPerformingRequest) {
        setState(() =&gt; isPerformingRequest = true);
        List&lt;int&gt; newEntries = await fakeRequest(
            items.length, items.length + 10); //returns empty list
        if (newEntries.isEmpty) {
          double edge = 50.0;
          double offsetFromBottom = _scrollController.position.maxScrollExtent -
              _scrollController.position.pixels;
          if (offsetFromBottom &lt; edge) {
            _scrollController.animateTo(
                _scrollController.offset - (edge - offsetFromBottom),
                duration: new Duration(milliseconds: 500),
                curve: Curves.easeOut);
          }
        }
        setState(() {
          items.addAll(newEntries);
          isPerformingRequest = false;
        });
      }
    }
  
    Future&lt;List&lt;int&gt;&gt; fakeRequest(int from, int to) async {
      return Future.delayed(Duration(seconds: 1), () {
        return List.generate(to - from, (i) =&gt; i + from);
      });
    }
  
    Widget _buildProgressIndicator() {
      return new Padding(
        padding: const EdgeInsets.all(8.0),
        child: new Center(
          child: new Opacity(
            opacity: isPerformingRequest ? 1.0 : 0.0,
            child: new CircularProgressIndicator(),
          ),
        ),
      );
    }
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: AppBar(
          title: Text(""),
        ),
        body: ListView.builder(
          itemCount: items.length + 1,
  
          itemBuilder: (context, index) {
  
            if (index == items.length) {
              return _buildProgressIndicator();
            } else {
              if (index % 5 == 0) {
                return Image.network(
                  "http://sanctum-inle-resort.com/wp-content/uploads/2015/11/Sanctum_Inl_Resort_Myanmar_Flowers_Frangipani.jpg",
                  height: 200.0,
                );
              } else if (index.isOdd) {
                return Container(
                  padding: EdgeInsets.all(16.0),
                  child: ListTile(
                    leading: Icon(Icons.person),
                    title: Text('This is title'),
                  ),
                );
              } else {
                return ListTile(title: new Text("Number $index"));
              }
            }
          },
          controller: _scrollController,
        ),
      );
    }
  }
  </code></pre>