openMMDatabase method

Future openMMDatabase ()

Open the database. If the database does not yet exist, then create the database and execute the SQL command to generate the table

Implementation

Future openMMDatabase() async {

  var databasesPath = await getDatabasesPath();
  String path = join(databasesPath, 'mmDatabase.db');

  db = await openDatabase(path, version: 1,
      onCreate: (Database db, int version) async {
        await db.execute('''
          create table $tableTrackedDonations (
            $columnId integer primary key autoincrement,
            $columnAmount integer not null,
            $columnDateString text not null,
            $columnDonationProcessed integer not null)
          ''');
      });
}