What Will I Learn?
- You will learn how to use custom tween animations with custom values
- You will learn how to chain and compose animations in flutter
- You will learn how to use an Animated Builder widget
Requirements
- IDEA intellij or Visual Studio Code with the Dart/Flutter Plugins
- The Dart SDK and the Flutter SDK
- A fair understanding of Mobile development and Imperative or Object Oriented Programming
Difficulty
- Intermediate
Description
In this flutter video tutorial, we take a look at how we can create longer more complex animations by chaining and composing different animations together. We can use these various animations and apply them to a single widget to give it multiple dynamic features. Specifically, we look at how we can build out a box animation that first fades in using the opacity widget and property. Next the box rotates around the z axis using the transform property. Then the box moves upwards and to the right which is accomplished by manipulating the margin and edge insets of the box. The box then scales upwards and becomes a larger box before changing from a square into a circle. During this animation, the box also changes colors from red to a deep purple color. At the end of the tutorial, we change the intervals of each of these animations so that they overlap with one another.
We make use of the animated builder widget; a widget that allows us to build out a widget or set of widgets that use animations as a smaller part of the tree. This widget allows us to create a subtree of widgets which is more efficient because we do not need to re-render the entire widget tree every frame. We also make use of some of the custom made tween widgets in the flutter framework; these include the color tween, the edge insets tween and the border radius tween. These tweens automatically take the output of our curve functions and convert it to the proper property that we need for our animation elements.
The source code for this project can be found here
Video Tutorial
Curriculum
- Dart Flutter Cross Platform Chat Application Tutorial
- Building a Multi-Page Application with Dart's Flutter Mobile Framework
- Making Http requests and Using Json in Dart's Flutter Framework
- Building Dynamic Lists with Streams in Dart's Flutter Framework
- Using GridView, Tabs, and Steppers in Dart's Flutter Framework
- Using Global Keys to get State and Validate Input in Dart's Flutter Framework
- The Basics of Animation with Dart's Flutter Framework
- Advanced Physics Based Animations in Dart's Flutter Framework
- Building a Drag and Drop Application with Dart's Flutter Framework
- Building a Hero Animation and an Application Drawer in Dart's Flutter Framework
- Building a Temperature Conversion Application using Dart's Flutter Framework
- Using Inherited Widgets and Gesture Detectors in Dart's Flutter Framework
- Using Gradients, Fractional Offsets, Page Views and Other Widgets in Dart's Flutter Framework
- Building a Calculator Layout using Dart's Flutter Framework
- Finishing our Calculator Application with Dart's Flutter Framework
- Making use of Shared Preferences, Flex Widgets and Dismissibles with Dart's Flutter framework
- Using the Different Style Widgets and Properties in Dart's Flutter Framework
Posted on Utopian.io - Rewarding Open Source Contributors