CircleComponent.relative constructor
CircleComponent.relative(})
With this constructor you define the CircleComponent in relation to the
parentSize
. For example having a relation
of 0.5 would create a circle
that fills half of the parentSize
.
Implementation
CircleComponent.relative(
double relation, {
required Vector2 parentSize,
super.position,
super.scale,
super.angle,
super.anchor,
super.paint,
super.paintLayers,
super.children,
super.key,
}) : super(size: Vector2.all(relation * min(parentSize.x, parentSize.y)));