RectangleComponent.square constructor
RectangleComponent.square({})
Implementation
RectangleComponent.square({
double size = 0,
super.position,
super.scale,
super.angle,
super.anchor,
super.priority,
super.paint,
super.paintLayers,
super.children,
super.key,
}) : super(sizeToVertices(Vector2.all(size), anchor)) {
this.size.addListener(
() => refreshVertices(
newVertices: sizeToVertices(this.size, anchor),
shrinkToBoundsOverride: false,
),
);
}