openDatabaseMiniAsync method
Future<DatabaseMiniGeneralLibrary>
openDatabaseMiniAsync({
- required String key,
- required DatabaseMiniGeneralLibraryBaseOptions databaseMiniGeneralLibraryBaseOptions,
- required Map defaultData,
Implementation
Future<DatabaseMiniGeneralLibrary> openDatabaseMiniAsync({
required String key,
required DatabaseMiniGeneralLibraryBaseOptions
databaseMiniGeneralLibraryBaseOptions,
required Map<dynamic, dynamic> defaultData,
}) async {
final DatabaseMiniGeneralLibrary? databaseMiniGeneralLibraryOld =
_stateDbMini[key];
if (databaseMiniGeneralLibraryOld == null) {
final DatabaseMiniGeneralLibrary newDatabaseMiniGeneralLibrary =
DatabaseMiniGeneralLibrary();
newDatabaseMiniGeneralLibrary.ensureInitialized(
pathToFile: key,
databaseMiniGeneralLibraryBaseOptions:
databaseMiniGeneralLibraryBaseOptions,
);
await newDatabaseMiniGeneralLibrary.initiaLized(
defaultData: defaultData,
);
_stateDbMini[key] = newDatabaseMiniGeneralLibrary;
return newDatabaseMiniGeneralLibrary;
}
return databaseMiniGeneralLibraryOld;
}