![]() |
VOOZH | about |
A Radial transformation means turning a circular shape into a square shape. In Radial Hero animation the same is done with a Hero. In Flutter, a Hero Widget is used to create a hero animation. A hero in this context refers to a widget that moves in between screens. This is one of the most fundamental types of animation used in the application, especially if the app deals with media like images. Simply put, a hero animation is when a hero flies from one screen to another.
The following process occurs while creating a radial hero Animation:
The following image shows the radial transformation of a hero at time = 0 to time =1.
👁 AfterclippingThe RadialExpansion widget works in the following depicted way:
👁 ImageNow let's build a simple app that has three heroes that make a radial transformation when clicked on them. The heroes will be stores in the following folder of the flutter app:
flutter_app/assets/images/.....Make sure to add the dependencies in the pubspec.yaml file as shown below:
👁 ImageNow let's build the main.dart file:
main.dart:
Output: