saveToFile method

Future<void> saveToFile(
  1. InspectionResult result,
  2. String filename
)

Saves the body of an InspectionResult to a local file.

Implementation

Future<void> saveToFile(InspectionResult result, String filename) async {
  final file = File(filename);
  await file.writeAsString(result.body);
  print('Saved to ${file.absolute.path}');
}