report method
Future<void>
report(
- Iterable<
UnusedFilesFileReport> records, { - Iterable<
void> summary = const [], - UnusedFilesReportParams? additionalParams,
override
Implementation
@override
Future<void> report(
Iterable<UnusedFilesFileReport> records, {
Iterable<void> summary = const [],
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);
}