Better Programming

Advice for programmers.

Follow publication

Member-only story

Introduction to Flutter Animations Using AnimatedContainer

Mohammad Azam
Better Programming
Published in
4 min readDec 14, 2019

Photo by Randall Ruiz on Unsplash

In this post, we are going to look at AnimatedContainer and how it can be used to perform animations in Flutter apps.

AnimatedContainer

There are several ways of performing animation in Flutter, but AnimatedContainer is probably one of the simplest.

The idea is to wrap your widgets inside a container (AnimatedContainer) and update the properties of AnimatedContainer over a period of time. These properties include height, width, color, borderRadius, border, etc.

Note: The transform and child property of AnimatedContainer cannot be animated.

Although this may feel limited, in nature you can combine and animate multiple properties to create interesting animations.

Getting Started

Let’s start by creating the basic layout of our application. This will consist of a button and a Container as shown in the implementation below:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Mohammad Azam
Mohammad Azam

Written by Mohammad Azam

Lead instructor at a coding bootcamp. Top iOS mobile instructor on Udemy. Author of multiple books and international speaker. azamsharp.school

Write a response