title: How to get values from Future<List> in Flutter
body: <p>I want to get value from sqflite database to a list in flutter.
  Here is my model class</p>
  <pre><code>
  class Task {
    final int id;
    final String title;
    final String description;
    final String dateTime;
  
    Task({this.id, this.title, this.description, this.dateTime});
  
    
    Map&lt;String, dynamic&gt; toMap() {
      return {
        'id':id,
        'title': title,
        'description': description,
        'dateTime': dateTime,
      };
    }
  </code></pre>
  <p>This is databaseHelper class for insert and retrieve data.</p>
  <pre><code>
  class DatabaseHelper {
    DatabaseHelper._();
    static final DatabaseHelper db = DatabaseHelper._();
  
    Database _database;
  
    Future&lt;Database&gt; get database async {
      if (_database != null) return _database;
      _database = await _createDatabase();
      return _database;
    }
  
    Future&lt;Database&gt; _createDatabase() async {
      return await openDatabase(join(await getDatabasesPath(), 'task.db'),
          onCreate: (db, version) {
        return db.execute(
          &quot;CREATE TABLE tasks(id INTEGER PRIMARY KEY AUTO_INCREMENT , title TEXT, description TEXT, dateTime TEXT)&quot;,
        );
      }, version: 1);
    }
  
  
  Future&lt;List&lt;Task&gt;&gt; tasks() async {
   
    final Database db = await database;
  
    final maps = await db.query('tasks');
  
    return List.generate(maps.length, (i) {
      return Task(
        id: maps[i]['id'],
        title: maps[i]['title'],
        description: maps[i]['description'],
        dateTime: maps[i]['dateTime']
      );
    });
  }
  
  
  
  Future&lt;void&gt; insertTask(Task task) async {
    final db = await database;
  
  
    await db.insert(
      'tasks',
      task.toMap(),
      conflictAlgorithm: ConflictAlgorithm.replace,
    );
  }
  }
  
  </code></pre>
  <p>When I use print(await tasks()) it shows [Instance of 'Task', Instance of 'Task'] in console. is it a bug?. I want to know how to get values form database using task() function in DatabaseHelper class.</p>