getEvents method

Future<List<Map<String, dynamic>>?> getEvents()

Implementation

Future<List<Map<String, dynamic>>?> getEvents() async {
  Database db = await this.database;

  var result = await db.rawQuery(
      "SELECT * FROM $eventTable WHERE datetime>=? ORDER BY $colDateTime ASC",
      [
        DateTime.now().millisecondsSinceEpoch -
            Duration(days: 3).inMilliseconds
      ]);

  return result;
}