Skip to content
pubscout

animated_rotation

2.0.0, released 6 years ago by jasonrai.ca

Implicitly animates rotation when the provided angle changes

WASM-ready
$ flutter pub add animated_rotation
Source repository

What it does

Provides an implicitly animated rotation widget that transitions its child widget to a new rotation angle whenever the value changes. It serves as an implicit alternative to Flutter's RotationTransition without requiring an explicit AnimationController. Users simply specify the target angle and wrap their child widget.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to rotate a widget smoothly when a state value changes without creating an AnimationController
  • You want an implicit animation for rotation in older Flutter projects where built-in AnimatedRotation might not be available

Skip it when

  • You are using modern Flutter SDK versions that already include the built-in AnimatedRotation widget
  • You need explicit, continuous, or reverse animation control that requires an AnimationController

Strengths

  • Simple declarative API requiring only the target angle and child
  • Eliminates boilerplate associated with AnimationController and TickerProviderStateMixin
  • Supports null safety

Weaknesses

  • Largely redundant since Flutter introduced its own built-in AnimatedRotation widget in the core framework
  • Minimal configuration options documented beyond the angle and child

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
AnimatedRotation(
  angle: _counter,
  child: Text('Rotated Text'),
)

Alternatives

Packages that do the same job and could replace animated_rotation.