render method
Implementation
@override
void render(Rect area, Buffer buffer, RenderContext ctx) {
final w = width ?? area.width;
final h = height ?? area.height;
final ax = switch (alignment.horizontal) {
-1 => area.x,
1 => area.right - w,
_ => area.x + (area.width - w) ~/ 2,
};
final ay = switch (alignment.vertical) {
-1 => area.y,
1 => area.bottom - h,
_ => area.y + (area.height - h) ~/ 2,
};
ctx.draw(child, Rect(ax, ay, w, h));
}