Skip to main content

Examples

Properties

Required

bool
required
Controls whether the rotation animation is active. When true, the child rotates continuously. When false, rotation stops with a smooth spring animation to the nearest complete rotation.
Widget
required
The widget to apply rotation animation to. This can be any widget including Icons, Containers, or complex widget trees.

Animation Behavior

Continuous Rotation

When isRotating is true, the widget rotates continuously at a steady pace (360° per second).

Spring Stop Animation

When isRotating changes from true to false, the rotation doesn’t stop abruptly. Instead, it uses a physics-based spring animation to smoothly decelerate to the nearest complete rotation (0°, 90°, 180°, or 270°).

Best Practices

  • Wrap a spinner icon, such as PhosphorIconsRegular.spinner, when you want a loading indicator.
Last modified on September 30, 2026