Bounds.fromCenter constructor
Bounds.fromCenter({})
Creates a Bounds from center and size.
Implementation
factory Bounds.fromCenter({
required double centerX,
required double centerY,
required double width,
required double height,
}) {
return Bounds(
x: centerX - width / 2,
y: centerY - height / 2,
width: width,
height: height,
);
}