I am trying to retrieve an image from a S3 bucket (hosted on Digital Ocean). The image is found and ready to be retrieved, but I get the following error: Unhandled Exception: type 'XmlDeclaration' is not a subtype of type 'XmlElement?' in type cast.
The code:
static Future initialize() async {
_bucketExists = await _minio.bucketExists(_bucketName); // returns true
await _minio.fGetObject(_bucketName, 'path/to/image.png', "download/to/image.png");
}
Using the minio package (https://pub.dev/packages/minio).