fileSha256 function
SHA-256 of a file (hex), or null when the file does not exist.
Implementation
Future<String?> fileSha256(String path) async {
final f = File(path);
if (!f.existsSync()) return null;
return sha256.convert(await f.readAsBytes()).toString();
}