in my MAUI App I am converting a jpeg into Base64String and sending this throughout Intent to my flutter App
here is MAUI Part
var path = FileSystem.Current.CacheDirectory;
string fn = "invoice.jpeg";
var fullPath = Path.Combine(path, fn);
byte[] data = await File.ReadAllBytesAsync(fullPath);
MemoryStream memoryStream = new MemoryStream(data);
string InvoiceImageText = Convert.ToBase64String(memoryStream.ToArray());
In Flutter I am recieving the string but I need to convert it to (bytesImg) so I can decode it and be able to use it
my current Flutter code looks like this
final ByteData data = await rootBundle.load('assets/mylogo.jpg');
final Uint8List bytesImg = data.buffer.asUint8List();
img.Image? image = img.decodeImage(bytesImg);
as you see above, my code currentely read ByteData from an Image saved in assets folder, but I need to replace that and use the Base64String Image recieved.
What types of conversion do I need to achive that? I am confused and appreciate your help
Thanks in advance!
Cheers