I'm trying to animate some images which should be orbited based on a circle.
Here i1, i2, i3 and i4 are four image widgets which should change their position on any touch event in a clockwise way. As I'm new in flutter animation any kind of hints or explanation would be very helpful for me.

Thanks for your question.
We can achieve this by using Flutter's
AnimationControllerand thedart:mathlibrary. I will share the sample workaround here.Two methods pop into my mind to achieve this, one is using custom UI and the other one is using the default Flutter framework widgets. I am going to use the Stack widget here.
Create a
StatefulWidgetNext, create AnimatedBuilder
Next find the
xposition andypositionFinally, we call the function in a for loop for as many children
The above code is tested and working I will post a video here
You can optimize the code as you want. Also, you can implement it inside an
InteractiveViewerif it is a big widget.You. can wrap it inside
RepaintBoundaryto crop the parts as you showed in the question.Thanks