toDataUrl method
Returns a data URI containing the canvas data in PNG format. See toPNG.
Implementation
FutureOr<String> toDataUrl() {
var pngData = toPNG();
if (pngData is Future<Uint8List>) {
return pngData.then(_toDataUrlImpl);
} else {
return _toDataUrlImpl(pngData);
}
}