readFileDataAsDataURLBase64 function
Reads file
as DATA URL Base64 String.
Implementation
Future<String?> readFileDataAsDataURLBase64(File file,
[String accept = '']) async {
var base64 = await readFileDataAsBase64(file);
if (base64 == null) return null;
var mediaType = getFileMimeType(file, accept);
return toDataURLBase64(MimeType.asString(mediaType, ''), base64);
}