paintLoading method
The paint operations while the canvas is loading. See isLoadingResources.
Implementation
FutureOr<bool> paintLoading(PCanvas pCanvas) {
var w = pCanvas.width;
var h = pCanvas.height;
var font = loadingFont;
var style = loadingStyle;
var text = loadingText;
var m = pCanvas.measureText(text, font);
var x = (w ~/ 2) - (m.actualWidth ~/ 2);
var y = (h ~/ 2) - (m.actualHeight ~/ 2);
pCanvas.drawText(text, x, y, font, style);
return true;
}