importDatabaseFromFile function
Future<Database>
importDatabaseFromFile(
- String path,
- DatabaseFactory dstFactory,
- String dstPath, {
- SembastCodec? codec,
- List<
String> ? storeNames,
Import database from a file (currently in .jsonl format)
Implementation
Future<Database> importDatabaseFromFile(
String path,
DatabaseFactory dstFactory,
String dstPath, {
SembastCodec? codec,
List<String>? storeNames,
}) async {
var data = decodeImportAny(await File(path).readAsString());
return await importDatabaseAny(
data,
dstFactory,
dstPath,
codec: codec,
storeNames: storeNames,
);
}