title: Getting Data from Firestore User in Home Page
body: <p>I'm trying to get UserData from the Firestore database. I'm currently doing it with a Steam Provider, inside this Steam provider is all my home page, I will like to be able to use the data from firestore inside my home page.
  <br>Heres the home page code:</p>
  
  <pre><code>return StreamProvider&lt;List&lt;usuariodata&gt;&gt;.value(
        value: DatabaseService().dadosusuarios,
        child: Scaffold(
        ...
  </code></pre>
  
  <p>Heres how I'm gathering stuff, from another file:</p>
  
  <pre><code>class DatabaseService {
  //Colection reference
  final String uid;
  DatabaseService({this.uid});
  
  final CollectionReference userdata = 
  Firestore.instance.collection('dadosusuarios');
  
  //dados usuario snapshot
  List&lt;usuariodata&gt; _usuariosListFromSnapshot(QuerySnapshot snapshot) {
  return snapshot.documents.map((doc){
    return usuariodata(
      name: doc.data['name'] ?? '',
      sensores: doc.data['sensores'] ?? '',
      led1: doc.data['led1'] ?? false,
      quantidade: doc.data['quantidade'] ?? 0,
      );
    }).toList();
   }
  
  Stream&lt;List&lt;usuariodata&gt;&gt; get dadosusuarios {
  return userdata.snapshots()
  .map(_usuariosListFromSnapshot);
  }
  }
  </code></pre>
  
  <p>I would be able to call it from another page like this:</p>
  
  <pre><code>final data = Provider.of&lt;&lt;List&lt;usuariodata&gt;&gt;(context);
  data.forEach((data) {
    print(data.name);
    ...
  )};
  </code></pre>
  
  <p><strong>But since this is supposed to be used in another page, how could I gather the info from my firestore database and store it into usable variables before my main page shows.</strong></p>