RectangleShape constructor

RectangleShape(
  1. Vector2 size, {
  2. Vector2? position,
})

Implementation

RectangleShape(Vector2 size, {Vector2? position})
    : _rect = Rect.fromLTWH(
        position?.x ?? 0,
        position?.y ?? 0,
        size.x,
        size.y,
      ),
      super(position ?? Vector2.zero()) {
  _updateExtremities(this.position);
}