Dart PI (π) and Rotation in Flutter given with example. We should start with the question, what's pi (π)? .
This π refers to rotation of a cirlce. One π refers 180 rotation which half of a circle. So 2π refers to 360 rotation or angle.
π (pi) is actually radian. So here we see 90 degree is 1.57 (radian). Now we will how to use this radian in Flutter Transform.rotate() widget.
Within Transform.rotate() we see angle property. Here we put angle 90 is equal 1.57 radian which is derived from 2π is 360 angle.
So if we want to rotate an object, icon or image, using Transform.rotate() is the way to go and just change angle based on 2π equal 360 .