diff --git a/lib/handlers/file_handler.dart b/lib/handlers/file_handler.dart index 68207c2..068f504 100644 --- a/lib/handlers/file_handler.dart +++ b/lib/handlers/file_handler.dart @@ -40,6 +40,7 @@ class FileHandler extends ReportHandler { @override Future handle(Report report, BuildContext? context) async { + _openedFile = fileSupplier != null ? fileSupplier!(report) : file; try { if (!_fileValidated) { _fileValidationResult = await _checkFile(); @@ -83,7 +84,6 @@ class FileHandler extends ReportHandler { } Future _openFile(Report report) async { - _openedFile = fileSupplier != null ? fileSupplier!(report) : file; _sink = _openedFile!.openWrite(mode: FileMode.append); _printLog('Opened file'); }