init method

Future<Database> init()

Implementation

Future<Database> init() async{
  return openDatabase(
    join(await getDatabasesPath(), 'materialx_flutter.db'),
    onCreate: (db, version) {
      return db.execute(
        "CREATE TABLE notification("
            "id INTEGER PRIMARY KEY, title TEXT, content TEXT, type TEXT, "
            "image TEXT, link TEXT, createdAt INTEGER, isRead INTEGER"
            ")",
      );
    },
    version: 1,
  );
}