memoryImageToBase64 static method

String memoryImageToBase64(
  1. MemoryImage memoryImage
)

Encodes a MemoryImage to a base64-encoded string.

This method encodes the binary data of the provided MemoryImage into a base64-encoded string.

Example usage:

MemoryImage memoryImage = ...; // Replace with your MemoryImage instance
String base64String = memoryImageToBase64(memoryImage);
// Use the 'base64String' in your application as needed.

Returns a base64-encoded string representation of the binary data in the provided MemoryImage.

Implementation

static String memoryImageToBase64(MemoryImage memoryImage) {
  return base64Encode(memoryImage.bytes);
}