loadBytes method
Method to load the image bytes.
Implementation
Future<Uint8List> loadBytes() async {
await load();
// If loading is successful, the image will not be null
// If loading fails, an exception will be thrown
return image!.getEncodedBuffer();
}