report method

  1. @override
Future<void> report(
  1. Iterable<UnusedL10nFileReport> records, {
  2. Iterable<void> summary = const [],
  3. UnusedL10NReportParams? additionalParams,
})
override

Implementation

@override
Future<void> report(
  Iterable<UnusedL10nFileReport> records, {
  Iterable<void> summary = const [],
  UnusedL10NReportParams? additionalParams,
}) async {
  if (records.isEmpty) {
    return;
  }

  final encodedReport = json.encode({
    'formatVersion': formatVersion,
    'timestamp': getTimestamp(),
    'unusedLocalizations': records.map(_unusedL10nFileReportToJson).toList(),
  });

  output.write(encodedReport);
}