title: Flutter circular animation on event
body: <p>I am trying to implement such animation using AnimatedPositioned widget, where it will move around center point clockwise or counterclockwise by a certain degree on event. Basically like planet around the sun.
  I am using this function to calculate movement:</p>
  <pre><code>  double x = 0;
    double y = 0;
    double radius;
    void updatePosition({
      @required double centerX,
      @required double centerY,
    }) {
      radius = min(centerX, centerY);
      x = centerX + radius * cos(angle * -pi / 90);
      y = centerX + radius * sin(angle * -pi / 90);
      angle += 5;
    }
  </code></pre>
  <p>But i cannot wrap my head around how to adjust initial points in relation to the center of container with given constrains.</p>