We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9117bd4 commit 409a504Copy full SHA for 409a504
lib/handlers/file_handler.dart
@@ -55,7 +55,7 @@ class FileHandler extends ReportHandler {
55
56
Future<bool> _processReport(Report report) async {
57
if (_fileValidationResult) {
58
- await _openFile(report);
+ await _openFile();
59
await _writeReportToFile(report);
60
await _closeFile();
61
return true;
@@ -83,7 +83,11 @@ class FileHandler extends ReportHandler {
83
}
84
85
86
- Future<void> _openFile(Report report) async {
+ Future<void> _openFile() async {
87
+ if (_openedFile == null) {
88
+ _printLog('Could not open file');
89
+ return;
90
+ }
91
_sink = _openedFile!.openWrite(mode: FileMode.append);
92
_printLog('Opened file');
93
0 commit comments