Skip to content

Commit

Permalink
Clean up FileHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
ThexXTURBOXx committed Feb 18, 2024
1 parent 9117bd4 commit 409a504
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/handlers/file_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class FileHandler extends ReportHandler {

Future<bool> _processReport(Report report) async {
if (_fileValidationResult) {
await _openFile(report);
await _openFile();
await _writeReportToFile(report);
await _closeFile();
return true;
Expand Down Expand Up @@ -83,7 +83,11 @@ class FileHandler extends ReportHandler {
}
}

Future<void> _openFile(Report report) async {
Future<void> _openFile() async {
if (_openedFile == null) {
_printLog('Could not open file');
return;
}
_sink = _openedFile!.openWrite(mode: FileMode.append);
_printLog('Opened file');
}
Expand Down

0 comments on commit 409a504

Please sign in to comment.