parsePayloadAsBase64 static method
Parses the Data URL to a Base-64 string.
Implementation
static String? parsePayloadAsBase64(String? dataURL) {
if (dataURL == null || dataURL.length < 5 || !dataURL.startsWith('data:')) {
return null;
}
var idx = dataURL.indexOf(',');
return dataURL.substring(idx + 1);
}