create static method

Future<SembastCacheManager> create({
  1. required String databasePath,
  2. String databaseName = "sembast_cache_manager",
})

Implementation

static Future<SembastCacheManager> create({
  required String databasePath,
  String databaseName = "sembast_cache_manager",
}) async {
  final dbFileName = "$databaseName.db";
  final dbPath = p.join(databasePath, dbFileName);

  await Directory(databasePath).create(recursive: true);

  final database = await databaseFactoryIo.openDatabase(dbPath);
  return SembastCacheManager(database);
}