calculateSize method
Calculates the size of the element based on the provided size.
This method calculates the size of the element using the
property.heightFactor and property.widthFactor. If the width factor is
not specified, the height radius is used.
size: The size of the area to paint.
Returns the calculated size of the element.
Implementation
@protected
double calculateSize(Size size) {
final heightRadius = property.heightFactor * size.height / 2;
if (property.widthFactor == null) return heightRadius;
final widthRadius = (property.widthFactor ?? 1) * size.width / 2;
return math.min(widthRadius, heightRadius);
}