```

class MyClass extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var _userSnapshot;
    List<dynamic> myContactsList;
    return StreamProvider<DocumentSnapshot>.value(
      value: DatabaseService("").myUser,
      builder: (context, child) => Expanded(
        child: Container(
            child: (_userSnapshot = Provider.of<DocumentSnapshot>(context)) ==
                        null ||
                    (myContactsList = _userSnapshot.data["contacts"]) == null
                ? Padding(
                    // if no contacts were found
                    padding: EdgeInsets.all(10.0),
                    child: Column(
                      children: <Widget>[
                        Text(
                          "No recent chats yet",
                        ),
                      ],
                    ),
                  )
                : ListView.builder(
                    itemCount: _userSnapshot.data["contacts"].length,
                    itemBuilder: (context, index) => FutureBuilder(
                      future: DatabaseService("").getUserById(
                        myContactsList.elementAt(index),
                      ),
                      builder: (context, snapshot) => GestureDetector(
                        onTap: () => Navigator.push(
                          context,
                          MaterialPageRoute(
                            builder: (_) => ChatScreen(
                              myContactsList.elementAt(index),
                              snapshot.data["displayName"],
                            ),
                          ),
                        ),
                        child: Container(
                          margin: EdgeInsets.only(top: 5, bottom: 5, right: 20),
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: <Widget>[
                              Row(
                                children: <Widget>[
                                  FutureBuilder(
                                    future: DatabaseService("").getUserById(
                                      myContactsList.elementAt(index),
                                    ),
                                    builder: (context, snapshot) =>
                                        CircleAvatar(
                                      radius: 33,
                                      backgroundImage: snapshot
                                                  .data["imageUrl"] ==
                                              null
                                          ? snapshot.data["isMale"] == true
                                              ? AssetImage(
                                                  "assets/images/male.png")
                                              : AssetImage(
                                                  "assets/images/female.png")
                                          : AssetImage(
                                              "assets/images/male.png"),
                                    ),
                                  ),
                                  SizedBox(width: 10),
                                  Column(
                                    crossAxisAlignment:
                                        CrossAxisAlignment.start,
                                    children: [
                                      FutureBuilder<DocumentSnapshot>(
                                        future: DatabaseService("").getUserById(
                                          myContactsList.elementAt(index),
                                        ),
                                        builder: (context, snapshot) => Text(
                                          snapshot.data["displayName"],
                                          style: TextStyle(
                                            color: Colors.grey,
                                            fontSize: 18,
                                            fontWeight: FontWeight.bold,
                                          ),
                                        ),
                                      ),
                                      SizedBox(height: 5),
                                      Container(
                                        width:
                                            MediaQuery.of(context).size.width *
                                                0.45,
                                        child: Text(
                                          "Something N. $index ",
                                          style: TextStyle(
                                            color: Colors.blueGrey,
                                            fontSize: 18,
                                            fontWeight: FontWeight.w600,
                                          ),
                                          overflow: TextOverflow.ellipsis,
                                        ),
                                      ),
                                    ],
                                  ),
                                ],
                              ),
                              Column(
                                children: <Widget>[
                                  Text(
                                    "TIME"
                                  ),
                                  Container(
                                    height: 20,
                                    width: 40,
                                    decoration: BoxDecoration(
                                      color: Theme.of(context).primaryColor,
                                      borderRadius: BorderRadius.circular(30),
                                    ),
                                    alignment: Alignment.center,
                                    child: Text(
                                      "NEW",
                                      style: TextStyle(
                                        color: Colors.white,
                                        fontSize: 11,
                                        fontWeight: FontWeight.bold,
                                      ),
                                    ),
                                  ),
                                ],
                              ),
                            ],
                          ),
                        ),
                      ),
                    ),
                  ),
          ),
        ),
      ),
    );
  }
}

```

Every time i interact with my app and a change is triggered in my cloud Firestore DB i get a snapshot using `StreamProvider()`. And when this happens i get some exceptions listed below but after half of a second the screen is fixed, probably cause of the new snapshot i guess(?).
Well as listed below the problem comes from `FutureBuilder()`'s i use.
Here is the error:

```
The following NoSuchMethodError was thrown building FutureBuilder<DocumentSnapshot>(dirty, state: _FutureBuilderState<DocumentSnapshot>#98dd9):
The method '[]' was called on null.
Receiver: null
Tried calling: []("imageUrl")

The relevant error-causing widget was: 
  FutureBuilder<DocumentSnapshot> file:///home/pss/Desktop/android/flutter_firebase_chat_app/lib/widgets/recent_chats.dart:90:35
When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      RecentChats.build.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter_firebase_chat_app/widgets/recent_chats.dart:98:56)
#2      _FutureBuilderState.build (package:flutter/src/widgets/async.dart:740:55)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4663:28)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4546:15)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

Another exception was thrown: NoSuchMethodError: The method '[]' was called on null.

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The method '[]' was called on null.
Receiver: null
Tried calling: []("displayName")
The relevant error-causing widget was: 
  FutureBuilder<DocumentSnapshot> file:///home/pss/Desktop/android/flutter_firebase_chat_app/lib/widgets/recent_chats.dart:114:39

```

The errors point in these 2 lines:
 `backgroundImage: snapshot.data["imageUrl"] == null`
&
`builder: (context, snapshot) => Text(snapshot.data["displayName"]`

So im not sure to be honest. I think it's cause of the `FutureBuilder()`'s cause without them i get no exceptions.
Im new to Flutter so any advice will be greatly appreciated !