connect static method

Future<Database> connect()

Implementation

static Future<Database> connect() async {
  await init();
  Database database = await openDatabase(path, version: 1, onCreate: (Database db, int version) async {
    await db.execute('CREATE TABLE Chat (id INTEGER , idlist INTEGER ,message TEXT, isLabel TEXT, type TEXT, date TEXT, person_name TEXT, person_image TEXT,chatType INTEGER, fileType TEXT,idFile TEXT,progress Text,time_zone INTEGER,status INTEGER,PRIMARY KEY (id, idlist)) ');
    await db.execute('CREATE TABLE ListChat (id INTEGER PRIMARY KEY, read INTEGER,updated INTEGER,person_name TEXT, person_image TEXT, message TEXT,chatType INTEGER,token TEXT,groupToken TEXT,time_zone INTEGER)');
  });

  return database;
}