getFailureFile method Null safety
Returns the appropriate file for a given diff from a ComparisonResult.
Implementation
File getFailureFile(String failure, Uri golden, Uri basedir) {
final String fileName = golden.pathSegments.last;
final String testName = '${fileName.split(path.extension(fileName))[0]}_$failure.png';
return File(path.join(
path.fromUri(basedir),
path.fromUri(Uri.parse('failures/$testName')),
));
}