title: Class 'Future<dynamic>' has no instance method '[]'. Flutter
body: <p>I don't understand futures well in flutter and its been a persistent struggle through all my apps. This is one of those errors.
  When I remove the &quot;[]&quot; it shows &quot;instance of 'Future'&quot; and that's about it.</p>
  <pre><code>Class 'Future&lt;dynamic&gt;' has no instance method '[]'.
  Receiver: Instance of 'Future&lt;dynamic&gt;'
  Tried calling: [](0)
  </code></pre>
  <pre><code>class ListOfEntries extends StatelessWidget{
    @override
    Widget build(BuildContext context) {
     return Scaffold(
       appBar: AppBar(
         shape: RoundedRectangleBorder(borderRadius: BorderRadius.vertical(bottom: Radius.circular(30))),
         title: Text(&quot;Your entries&quot;),
         toolbarHeight: 50,
       ),
       body: FutureBuilder&lt;List&gt;(
         future: Database_().entries(),
         builder: (context, snapshot) {
           return snapshot.hasData ?
           new ListView.builder(
             padding: const EdgeInsets.all(10.0),
             itemCount: snapshot.data.length,
             itemBuilder: (context, i) {
               return Column(
                 children: [
                   Text(&quot;${GetList()[i]}&quot;),
                 ],
               );
             },
           )
               : Center(
             child: Column(
             crossAxisAlignment: CrossAxisAlignment.center,
               mainAxisAlignment: MainAxisAlignment.center,
               children: [
                 CircularProgressIndicator(),
                 Text(&quot;&quot;),
                 Text(&quot;No entries yet:(&quot;),
               ],             
             
             )
           );
         }
      ),
  
      );
  
    }
    GetList()async{
      final list = await Database_().entries();
      return list;
    }
  
  }
  </code></pre>
  <p>This is the function that returns the list.</p>
  <pre><code>Future&lt;List&lt;Entry_&gt;&gt; entries() async {
      final Database db = await database;
      final List&lt;Map&lt;String, dynamic&gt;&gt; maps = await db.query('[Journal Entries]');
      return List.generate(maps.length, (i) {
        return Entry_(
          maps[i][&quot;_entry&quot;],
          maps[i][&quot;_date&quot;],
        );
      });
    }
  </code></pre>