alongOffset method

PwOffset alongOffset(
  1. PwSize parent,
  2. PwSize child
)

alongOffset API.

Implementation

PwOffset alongOffset(PwSize parent, PwSize child) {
  final double dx = (parent.width - child.width) * ((x + 1) / 2);
  final double dy = (parent.height - child.height) * ((y + 1) / 2);
  return PwOffset(dx, dy);
}