initializeDatabase method

Future<Database> initializeDatabase()

Implementation

Future<Database> initializeDatabase() async {
  Directory directory = await getApplicationDocumentsDirectory();
  String path = join(directory.path, "growlytics.db");

  var notesDatabase =
      await openDatabase(path, version: 1, onCreate: _createDB);

  return notesDatabase;
}