title: want to reach my username but snapshot.data!['username'] doesnt work
body: <p>In this line i get an error:</p>
  <p>snapshot.data!['username']</p>
  <p>Error message:
  The operator '[]' isn't defined for the type 'Object'.
  Try defining the operator '[]'</p>
  <p>In the turotorial I follows this gets you the username in Firebase but it doesnt work since the updates. How do I do to reach the username?</p>
  <pre><code>import 'package:cloud_firestore/cloud_firestore.dart';
  import 'package:flutter/material.dart';
  
  class MessageBubble extends StatelessWidget {
    MessageBubble(
      this.message,
      this.userId,
      this.isMe, {
      Key? key,
    }) : super(key: key);
  
    final String message;
    final String userId;
    final bool isMe;
  
    @override
    Widget build(BuildContext context) {
      return Row(
        mainAxisAlignment: isMe ? MainAxisAlignment.end : MainAxisAlignment.start,
        children: [
          Container(
            decoration: BoxDecoration(
              color: isMe
                  ? Color.fromARGB(210, 23, 163, 13)
                  : Color.fromARGB(255, 0, 36, 66),
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
                bottomLeft: !isMe ? Radius.circular(0) : Radius.circular(12),
                bottomRight: !isMe ? Radius.circular(12) : Radius.circular(0),
              ),
            ),
            width: 140,
            padding: EdgeInsets.symmetric(
              vertical: 10,
              horizontal: 16,
            ),
            margin: EdgeInsets.symmetric(vertical: 4, horizontal: 8),
            child: Column(
              children: [
                FutureBuilder&lt;Object&gt;(
                    future: FirebaseFirestore.instance
                        .collection('users')
                        .doc(userId)
                        .get(),
                    builder: (context, snapshot) {
                      if (snapshot.connectionState == ConnectionState.waiting) {
                        return Text('Loading...');
                      }
  
                      return Text(
                        snapshot.data!['username'], &lt;----------------THE ERROR
                        style: TextStyle(fontWeight: FontWeight.bold),
                      );
                    }),
                Text(
                  message,
                  style: TextStyle(color: Colors.orange),
                ),
              ],
            ),
          ),
        ],
      );
    }
  }
  </code></pre>