Well-designed animations make an app feel intuitive and polished. Flutter’s documentation notes that “well-designed animations make a UI feel more intuitive [and improve] the user experience”. In Flutter animations you can create motion using implicit animations (built-in animated widgets) or explicit animations (via AnimationController
and tweens) – both are easy to use. In this post, we’ll cover seven simple effects using Flutter’s built-in animation widgets and classes to boost your UI. We’ll look at implicit animations like AnimatedOpacity
and AnimatedContainer
, built-in transitions like FadeTransition
, and Hero/shared-element effects. (For completeness, you can also customize the app’s branding – e.g. setting a Flutter Android app icon – or use state management libraries like GetX to orchestrate animation triggers.)
Flutter’s implicit animations let you animate a widget simply by changing a target value. You don’t write the animation loop manually. Instead, the widget “automatically animates between the old and new values of properties when they change”. For example, wrapping a widget in AnimatedOpacity
will smoothly fade it to any new opacity value. These implicit widgets trade control for convenience: they manage the animation for you. Under the hood, Flutter’s implicit widgets derive from ImplicitlyAnimatedWidget
and animate over the given duration
and curve
docs.flutter.dev. Some implicit widgets animate a single property (e.g. AnimatedOpacity
only animates opacity
), while others like AnimatedContainer
can animate many properties at once (size, color, padding, alignment, and more)docs.flutter.dev.
Table of Contents
1. Fade (Opacity) Flutter animations

Use AnimatedOpacity to fade a widget in or out. Simply change the opacity
value (between 0 and 1), and the widget cross-fades between the values. For example, you can hide a text widget by setting opacity=0.0
, then call setState()
to change it to 1.0
on a button press. Flutter will then “animate the transition between the old and new value” automaticallydocs.flutter.dev. This creates a smooth fade-in/out effect without writing any animation loops. The duration
and curve
parameters let you control how long the fade takes and how it easesdocs.flutter.dev. Because AnimatedOpacity
only animates the opacity, it’s very simple to use for subtle UI feedback.
- Internal link: In our Flutter weather app tutorial, for example, we could use
AnimatedOpacity
to fade in weather details or alerts when data loads.
2. Scale and Size Flutter animations (AnimatedContainer)
The AnimatedContainer widget can animate changes in size, padding, margin, color, border radius, and more all at once. Whenever you update its properties (e.g. width, height, color), Flutter animations from the old values to the new onesdocs.flutter.dev. This is great for creating “growing” or “shrinking” effects. For example, you can wrap a button in an AnimatedContainer
and animate its height and color when tapped. Because it implicitly interpolates all specified properties, you can make complex UI transitions with minimal code. As the Flutter docs explain, “the AnimatedContainer widget animates changes to any of its properties” including ones you might not initially think to use (padding, transform, alignment, etc.)docs.flutter.dev. By adjusting duration
and curve
, you control the speed and feel of these size/color changes.
- Example use: A tap on an icon could trigger a setState() that changes the container’s
borderRadius
andcolor
, smoothly animating to a new shape.
3. Slide and Position Animation

To move widgets around, use AnimatedAlign, AnimatedPositioned, or built-in transitions. For example, putting a widget inside an AnimatedAlign
allows you to shift its position by changing the alignment
over time. Similarly, AnimatedPositioned
(used inside a Stack
) can animate changes to top
, left
, right
, bottom
. These implicit widgets smoothly interpolate the widget’s location. For more explicit control, Flutter provides widgets like SlideTransition
(used with an Animation<Offset>
) which slides a widget along a path (like sliding in from the left). Both approaches create a fluid movement effect. The key is that you set a new target position and Flutter animates the movement for you (or you can supply a Tween
and AnimationController
for explicit transitions). This adds dynamism to your UI, for example sliding a panel in from off-screen or moving a menu icon to a new spot with Flutter animations.
- Sample: Change an
AnimatedAlign
’s alignment fromAlignment.centerLeft
toAlignment.centerRight
; the child will glide across the screen.
4. Color and Border Flutter animations
AnimatedContainer
also covers color changes, but you can emphasize it by animating color or border separately. For example, use AnimatedContainer’s color
or decoration
property to interpolate background colors on state change, highlighting a selection or state. Alternatively, DecoratedBoxTransition
(with a DecorationTween
) can animate a decoration explicitly. But with implicit widgets, simply toggling a boolean can animate a color fade. This is useful for things like button color changes, theme transitions, or highlighting elements. Again, Flutter manages the animation from the old color to the new using the given curve
docs.flutter.dev.
- Note: Even though these are “just color” changes, they still benefit from animation: smooth color transitions feel more natural than abrupt changes.
5. Cross-Fade Animations
Use AnimatedCrossFade to transition smoothly between two entirely different widgets. This widget takes two children and a crossFadeState
; when you switch the state, it fades out one child while fading in the other, also smoothly animating their sizes. It’s handy for toggling UI panels or switching content. For example, you might cross-fade between a login form and a registration form. This built-in widget abstracts away the manual fading and resizing. Since it’s an implicit flutter animations, you simply update the state (which child should be visible) and Flutter handles the tweening between the two layouts.
- Practical tip: Wrap two images or text blocks in
AnimatedCrossFade
and change theCrossFadeState
. The system automatically interpolates opacity and size.
6. Hero (Shared Element) Animation
The Hero widget enables seamless shared-element transitions between routes. Flutter docs explain that a Hero is a “widget that flies between screens,” commonly seen when tapping a list item and moving to a detail page. To use it, wrap the shared widget (e.g. an image) on both source and destination routes with Hero
widgets that share the same tag
. When you navigate (push/pop a route), Flutter will animate the widget from its position on the first screen into its position on the second screen. This creates an eye-catching “flying” effect that visually anchors the navigation. It’s perfect for gallery apps, product listings, or anywhere you move from a list to detail view. The Flutter cookbook recommends this as “a common technique to guide users through an app” by animating a widget from one screen to the next.
- Example: In a photo gallery, wrap the thumbnail and the full-size image in
Hero(tag: "photoHero", ...)
. On tap, navigate to the detail page and the image will smoothly expand and move into place.
7. Built-in Transition Widgets (Explicit Animations)
Flutter also offers explicit animation widgets that use AnimationController
under the hood, but are easier than writing the controller code yourself. For example, use FadeTransition
, SizeTransition
, SlideTransition
, RotationTransition
, and ScaleTransition
. Each of these wraps a child widget and animates it according to an Animation<double>
or Animation<Offset>
. You can combine them by providing an AnimationController
and tweens. The advantage is fine-grained control over the animation timeline. For instance, a RotationTransition
can spin a widget with a given flutter animations, or a SizeTransition
can animate its height/width factor. The Flutter docs note that widgets like FadeTransition
and SlideTransition
are “simpler to implement than custom explicit Flutter animations” while still being very flexible. You just set up an AnimationController
and feed it into these transition widgets.
- Integration: These transitions complement implicit widgets. For complex choreographies (like sequential or looped Flutter animations), you might pair them with an
AnimationController
. This is still “built-in” because you’re using Flutter’s animation classes.
Conclusion and Links
By combining these animation techniques, you can make your Flutter UI much more engaging. Start with simple implicit widgets (AnimatedOpacity
, AnimatedContainer
, etc.) to add polish with minimal code. Use Hero widgets for dramatic screen transitions, and apply built-in FadeTransition
or SlideTransition
for custom animated effects when needed. Always remember to control animations’ duration and curves to match your app’s style.
For more on Flutter UI, you might check out related resources: how to set a Flutter app icon for Android to complete your app’s look, or our Flutter GetX tutorial to manage app state alongside Flutter animations. Whether you’re building a weather app or any other UI-driven app, these animations will help “delight users” with a slick experience.
Set app icons: How to set a Flutter app icon for Android — useful for polishing your animated app visuals.
Weather app example: Building a Weather App with Flutter — real project where animations improve UX.
State management for triggers: Flutter GetX Tutorial (state management) — use to orchestrate complex animation flows.