size method
Implementation
void size({
required int width,
required int height,
}) {
_desiredWidth = width;
_desiredHeight = height;
_paintingContext.size = Size(width.toDouble(), height.toDouble());
_onSizeChanged?.call();
background(color: _backgroundColor);
}