'Bad state: cannot get a field on a DocumentSnapshotPlatform which does not exist, Receiver: null Tried calling: get("Name")

enter image description hereI am trying to get the data of currently signed in user in profile screen of my app. Below is the code of getting the data of currently signed in user from the firebase. The field (Name) of which it is showing error do exist in the firebase and all the data I am trying to get is stored in the firebase but it shows the following error anytime I try to get from the firebase. Kindly help me through this.

class Profile extends StatelessWidget {
  static const id = 'Profile';

  @override
  Widget build(BuildContext context) {
    print(FirebaseAuth.instance.currentUser.uid);
    return Scaffold(
      backgroundColor: Colors.black,
      appBar: AppBar(
        backgroundColor: Colors.yellowAccent.shade700,
        leading: GestureDetector(
            onTap: () {
              Navigator.pop(context);
            },
            child: Icon(Icons.arrow_back)),
        actions: [
          Icon(Icons.person),
        ],
      ),
      body: StreamBuilder<DocumentSnapshot>(
        stream: FirebaseFirestore.instance
            .collection('Client_Data')
            .doc(FirebaseAuth.instance.currentUser.uid)
            .snapshots(),
        builder: (context, AsyncSnapshot<DocumentSnapshot> snapshot) {
          //print('////${FirebaseAuth.instance.currentUser.uid}');
          return Column(children: [
            Stack(
              children: [
                Padding(
                  padding: const EdgeInsets.only(top: 20.0, left: 20),
                  child: Container(
                    child: CircleAvatar(
                      radius: 70,
                      child: ClipOval(
                        child: Image.asset(
                          'assets/images/Flutter.jpeg',
                          height: 140,
                          width: 140,
                          fit: BoxFit.fill,
                        ),
                      ),
                    ),
                  ),
                ),
              ],
            ),
            SizedBox(
              height: 50,
            ),
            Padding(
              padding: const EdgeInsets.all(8.0),
              child: ProfileContainers(
                title: 'Name',
                value: snapshot.data.get('Name'),
              ),
            ),
            SizedBox(
              height: 15,
            ),
            Padding(
              padding: const EdgeInsets.all(8.0),
              child: ProfileContainers(
                title: 'Email',
                value: snapshot.data.get('Email'),
              ),
            ),


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source