Q:

FutureBuilder shows error before displaying the result

My futurebuilder gives error for few seconds on the screen and then show's the result 
here is the error logs:
The following NoSuchMethodError was thrown building FutureBuilder<DocumentSnapshot>(dirty, state: _FutureBuilderState<DocumentSnapshot>#fd0c5):
The method '[]' was called on null.
Receiver: null
Tried calling: []("title")

The relevant error-causing widget was: 
  FutureBuilder<DocumentSnapshot> file:///C:/Users/Admin/Desktop/Android/doorstep/lib/domain/repository/booking-repository.dart:7:12
When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      BookingRepository.getTitle.<anonymous closure> (package:doorstep/domain/repository/booking-repository.dart:11:39)
#2      _FutureBuilderState.build (package:flutter/src/widgets/async.dart)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4334:27)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4223:15)

Code
Widget getTitle(String id) {
  return FutureBuilder(
    future: Firestore.instance.collection('products').document(id).get(),
    builder: (BuildContext context, AsyncSnapshot<DocumentSnapshot> snapshot){
      return ListTile(
        title: Text("${snapshot.data['title'].toString()}"),
      );
    }
  );
}

A:

Try
FutureBuilder<AsyncSnapshot<DocumentSnapshot>>(
        builder: (context, snap) {
          if (snap.connectionState != ConnectionState.done) {
            //print('project snapshot data is: ${snap.data}');
            return Text("loading");
          } else {
            if (snap.hasError) {
              return Text([snap.error.toString()]); 
            }
            else {
              if (snap.hasData) {

                return Text("${snap.data['title'].toString()}");
              } else {
                return Text("No DAta");
              }
            }
          }
        },
        future:
        Firestore.instance.collection('products').document(id).get(),
    );

