report method
Future<void>
report(
- Iterable<
UnusedFilesFileReport> records, { - UnusedFilesReportParams? additionalParams,
override
Implementation
@override
Future<void> report(
Iterable<UnusedFilesFileReport> records, {
UnusedFilesReportParams? additionalParams,
}) async {
if (records.isEmpty) {
return;
}
final encodedReport = json.encode({
'formatVersion': formatVersion,
'timestamp': getTimestamp(),
'unusedFiles': records.map(_analysisRecordToJson).toList(),
'automaticallyDeleted': additionalParams?.deleteUnusedFiles ?? false,
});
output.write(encodedReport);
}