readAsBytesSync method
Synchronously reads the file bytes if in-memory, or from filesystem on IO.
Implementation
Uint8List? readAsBytesSync() {
if (bytes != null && bytes!.isNotEmpty) {
return bytes!;
}
if (!kIsWeb && path != null && path!.isNotEmpty) {
return io_helper.readFileBytesSync(path!);
}
return null;
}