alongSize method

Offset alongSize(
  1. Size other
)

Returns the offset that is this fraction within the given size.

Implementation

Offset alongSize(Size other) {
  final double centerX = other.width / 2.0;
  final double centerY = other.height / 2.0;
  return Offset(centerX + x * centerX, centerY + y * centerY);
}