readAsBytes method

  1. @override
Future<Uint8List> readAsBytes()
override

Reads the whole content as bytes. Works for every resource that exists; fails for one that does not.

Like Spring's getContentAsByteArray(), but asynchronous.

Implementation

@override
Future<Uint8List> readAsBytes() => FileAccess.readBytes(path);