init method
项目进行初始化
Implementation
Future<void> init([String? dbName]) async {
BaseDbManager.initial(this);
// Init ffi loader if needed.
sqfliteFfiInit();
// String dbPath = await _createDbPath();
// databaseFactoryFfi.setDatabasesPath(dbPath);
var databasesPath = await databaseFactoryFfi.getDatabasesPath();
String path = join(databasesPath, dbName ?? getDbName());
_database = await databaseFactoryFfi.openDatabase(
path,
options: OpenDatabaseOptions(
version: getDbVersion(),
onCreate: onCreate,
onUpgrade: onUpgrade,
onOpen: onOpen,
),
);
}