Composing Animations and Chaining Animations in Dart's Flutter Framework
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
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Thank you for moderating my content.
Hey @redart, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Hey @tensor I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Congratulations @tensor, this post is the eighth most rewarded post (based on pending payouts) in the last 12 hours written by a User account holder (accounts that hold between 0.1 and 1.0 Mega Vests). The total number of posts by User account holders during this period was 3988 and the total pending payments to posts in this category was $10056.43. To see the full list of highest paid posts across all accounts categories, click here.
If you do not wish to receive these messages in future, please reply stop to this comment.