title: My data from firestore not retrieve using dart flutter
body: <p>I am using cloud fire store in flutter I did:</p>
  
  <ol>
  <li>connected the app with the firebase</li>
  <li>put the google-services.json in app buil.gradle</li>
  <li>add the dependency and plugin</li>
  </ol>
  
  <pre><code>import 'package:flutter/material.dart';
  
  void main() =&gt; runApp(MyApp());
  
  class MyApp extends StatelessWidget {
    MyApp();
    @override
    Widget build(BuildContext context) {
      // TODO: implement build
      return MaterialApp(
        title: 'کوردی پۆلی یەک',
        theme: ThemeData(
          primarySwatch: Colors.blueGrey,
        ),
        home: MainScreen(),
      );
    }
  }
  class MainScreen extends StatelessWidget{
  
    List&lt;Widget&gt; makeListWidget(AsyncSnapshot snapshot){
      return snapshot.data.documents.map&lt;Widget&gt;((document){
        return ListTile(
          title: Text(document["name"]),
        );
      }).toList();
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text("کوردی پۆلی یەک",style: TextStyle(color: Colors.white),),
          backgroundColor: Colors.deepOrange,
        ),
        body: Container(
          child: StreamBuilder(
            stream: Firestore.instance.collection('lesson').snapshots(),
            builder: (context,snapshot){
              switch(snapshot.connectionState){
                case ConnectionState.none:
                  return Center(child: Text('No data'));
                case ConnectionState.waiting:
                  return Center(
                      child:CircularProgressIndicator());
                default:
                  return ListView(
                    children:makeListWidget(snapshot),
                  );
              }
            },
          ),
        ),
      );
    }
  }
  </code></pre>
  
  <p>It is just loading and when ever I delete the <code>connectionState.waiting</code> gives me error:</p>
  
  <blockquote>
    <p>NoSuchMethodError: The getter 'documents' was called on null. Receiver: null
    Tried calling </p>
  </blockquote>