title: How do you get a a collection of documents from firestore and turn it into a list in flutter?
body: <p>I have been trying to figure out how to query Firestore and save the output to a list so that I can use it in another part of the app.</p>
  <p>I have tried to save it into a list but I get &quot;Unhandled Exception: type 'double' is not a subtype of type 'List dynamic'&quot;.</p>
  <p>I then tried to save it as a List but then I get &quot;Unhandled Exception: type 'double' is not a subtype of type 'List double'</p>
  <p>I also tried to output it as a map but I think I'm missing something there because it won't compile.</p>
  <p>Here is the function:</p>
  <pre><code>setMainDebt()async{
      final uid = await Provider.of(context).auth.getCurrnetUid();
      final fireStoreData = await db.collection('userDebts').document(uid).collection('debts').orderBy('balance').getDocuments();
      for(var theData in fireStoreData.documents){
          final List&lt;double&gt; value = theData.data['balance'];
          print(value);    
      }    
    }
  </code></pre>