getImageSource function
Get the image source for an image
Implementation
String getImageSource(String url, String format) {
if (url.startsWith('#')) {
return "data:image/$format;base64,${url.substring(1, url.length - format.length)}";
} else {
return url;
}
}