title: Flutter Firestore display document ID when a data in field is inputted in textfield
body: <p>Here is the <strong>screenshot</strong> of my Firestore database
  <a href="https://i.stack.imgur.com/FMcnE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FMcnE.jpg" alt="screenshot" /></a>
  The document ID is named after user uid.</p>
  <p>Below is the <strong>code</strong> I have so far</p>
  <pre><code>  Widget _inputEmail() {
  return StreamBuilder&lt;QuerySnapshot&lt;Map&lt;String, dynamic&gt;&gt;&gt;(
      stream: FirebaseFirestore.instance
          .collection(&quot;users&quot;)
          .snapshots(),
      builder: (context, snapshot) {
      return Container(
        width: 355,
        padding: EdgeInsets.only(bottom: 20),
        child: TextFormField(
          controller: _email,
          decoration: InputDecoration(
              hintText: 'Email',
              helperText: 'Enter Email',
              suffixIcon: IconButton(
                icon: Icon(Icons.navigate_next),
                onPressed: () {
                  FirebaseFirestore.instance
                      .collection('users')
                      .where('email', isEqualTo: _email)
                      .get()
                      .then((snapshot) =&gt; print(snapshot.docs[0].data()['user.uid']));
                },
              ),
              border: UnderlineInputBorder()),
        ),
      );
    }
  );
  </code></pre>
  <p>What am I trying to achieve is, in this textfield when a user inputs an email, it will show the document ID of where that email is located so that I can make another function to modify the money data.</p>
  <p><strong>App Screenshot</strong></p>
  <p><a href="https://i.stack.imgur.com/qMyvQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qMyvQ.png" alt="App Screenshot" /></a></p>
  <p>Basically this will be a transfer menu where the email entered is the recipient's email, and after pressing the button, the user can input the number of money they want to transfer to the target email. Then the amount of money from the current user will be transferred over to the recipient's account.</p>
  <p>Sorry for asking too much, I am still learning how Firestore works for a uni project.</p>