formatImage function

Uint8List formatImage(
  1. String? imageData
)

Decodes a base64 encoded string imageData to a Uint8List. If the input is null or empty, it uses kDefaultImageBase64.

Implementation

Uint8List formatImage(String? imageData) {
  if (imageData == null || imageData == '') {
    imageData = kDefaultImageBase64;
  }
  return base64Decode(imageData);
}