title: Create List View with Stream Builder
body: <p>Want to create a list view from live data from server using stream,
  so create fake stream of data and then save its snapshot in a list to test result, when use that list in ListTile and run app get following error:</p>
  <p>The following assertion was thrown building ListTile(dirty):
  No Material widget found.</p>
  <p>ListTile widgets require a Material widget ancestor.</p>
  <pre><code>void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        home: SafeArea(
          child: Center(
            child: StreamBuilderPage(),
          ),
        ),
      );
    }
  }
  
  class StreamBuilderPage extends StatefulWidget {
    @override
    _StreamBuilderPageState createState() =&gt; _StreamBuilderPageState();
  }
  
  class _StreamBuilderPageState extends State&lt;StreamBuilderPage&gt; {
    List&lt;int&gt; items = [];
    @override
    Widget build(BuildContext context) {
      return StreamBuilder(
        //Error number 2
        stream: NumberCreator().stream,
        builder: (context, snapshot) {
          if (snapshot.connectionState == ConnectionState.waiting) {
            return CircularProgressIndicator();
          } else if (snapshot.connectionState == ConnectionState.done) {
            return Text('done');
          } else if (snapshot.hasError) {
            return Text('Error!');
          } else {
            items.add(snapshot.data);
            print(items); //print every second: [0] then [0,1] then [0,1,2] ...
            return ListView.builder(
              itemBuilder: (context, index) {
                return ListTile(
                  title: Text(items[index].toString()),
                );
              },
              itemCount: items.length,
            );
          }
        },
      );
    }
  }
  
  class NumberCreator {
    NumberCreator() {
      Timer.periodic(Duration(seconds: 1), (timer) {
        //add count to stream
        _controller.sink.add(_count);
        _count++;
      });
    }
    var _count = 1;
    final _controller = StreamController&lt;int&gt;();
  
    Stream&lt;int&gt; get stream =&gt; _controller.stream;
  
    dispose() {
      _controller.close();
    }
  }
  
  </code></pre>
  <p>What actually cause this error?
  Thanks community.</p>