circleAt method

Offset circleAt(
  1. double width,
  2. double height,
  3. double radius,
  4. double angle,
)

Method to create offset for the ball

Implementation

Offset circleAt(double width, double height, double radius, double angle) {
  var x = (width / 2 + radius * (cos(angle)));
  var y = (height / 2 + radius * (sin(angle)));
  return Offset(x, y);
}