extractFile method
Extract File
Implementation
Future<void> extractFile(
FileRecord fileRecord, {
required String savePath,
bool Function()? isCancelled,
void Function(double progress)? onProgress,
}) async {
if (!isOpened) throw Exception('You Should Call -> SMDB.open()');
final raf = await File(path).open();
await fileRecord.extract(
raf,
savePath: savePath,
isCancelled: isCancelled,
onProgress: onProgress,
);
await raf.close();
}