By WalkingTree   April  21, 2020

There are numerous animation widgets to choose from in Flutter. Figuring out which widget is the best fit for your application can be a little challenging. Let’s walk through a series of questions before choosing the right animation widget. Also, keep in mind that the widgets provided in the Flutter core are pretty low level. If you are looking for more complex animations then its best to look for other animation packages available in the market. 

There are roughly about 2 main types of animations that you can include in your Flutter app:

  • Code-based animations – These animations are widget focused and mostly seen in a standard layout or style like rows, columns, colors, etc. Code-based animations mostly focus on enhancing an existing widget’s transition rather than acting as a widget on their own. 
  • Drawing-based animations – As the name suggests, drawing-based animations look like someone drew it and involves transformations which can be difficult to express via a code. 

So, the questions to ask yourself is whether your animation is supposed to look more like a drawing or it can be easily created using Flutter’s animation widgets? If your answer is the first option, then it’s best to build your application graphically and then export it to Flutter. There are many packages that can help you include these assets in your Flutter app. 

If you are going for Code-based animations then you should first be aware of Flutter code flavors:

  • Implicit animations – Implicit animation simply means you putting a value for some widget property and Flutter takes care of the animation part. These widgets are simple and easy to use and most of the animations you see out there, are done using implicit animations. 
  • Explicit animations – Explicit animations require an animation controller. The only drawback of explicit animations is that you have to manage the lifecycle of that animation controller.
Translate »