file method

Future<HashDigest> file(
  1. File input, [
  2. int start = 0,
  3. int? end
])

Converts the input file and returns a HashDigest asynchronously.

If start is present, the file will be read from byte-offset start. Otherwise from the beginning (index 0).

If end is present, only bytes up to byte-index end will be read. Otherwise, until end of file.

Implementation

@pragma('vm:prefer-inline')
Future<HashDigest> file(File input, [int start = 0, int? end]) {
  return bind(input.openRead(start, end)).first;
}