readAsBytesSync method

  1. @override
Uint8List readAsBytesSync()
override

Synchronously reads the entire file contents as a list of bytes.

Throws a FileSystemException if the operation fails.

Implementation

@override
Uint8List readAsBytesSync() {
  final List<int> buffer = fs.readFileSync(path);
  return Uint8List.fromList(buffer);
}