SlideShare a Scribd company logo
1 of 12
How to Create Animation Using the AnimatedAlign
Widget?
The Flutter Agency focused on the most often used widgets while
creating a Flutter app. If you have a basic understanding of those
widgets, it becomes much easier for anyone to start creating
wonderful apps with Flutter.
Now that Flutter offers animations, you can build wonderful fun-filled
animations in your app by using animated widgets. So, in this article,
we will see the AnimatedAlign widget.
To improve your application usability and performance, make sure you
utilize this feature whenever you hire Flutter developer to build your
business application. Sometimes you may need to change the
alignment of a widget, and adding an animation can make the
transition smoother during the transition to the new alignment. In
Flutter, creating such animation can be done thanks easily to the
AnimatedAlign widget.
The Animated Align Widget aligns the child’s location in a given period
in a given alignment automatically. You can also choose an animation
period with a curve. The alignment to the new target will be animated
by the widget.
Let’s go over the constructor…
const AnimatedAlign(
{Key? key,
required AlignmentGeometry alignment,
Widget? child,
double? heightFactor,
double? widthFactor,
Curve curve = Curves.linear,
required Duration duration,
VoidCallback? onEnd}
)
There isn’t much in the constructor, other than 3 properties that are
important that make the whole animation work.
Alignment(Alignment): the initial position of the
child widget.
1. Curve(Curve): In curve animation, easy curves are utilized to modify
the rate of change. This enables both slow and high speeds. There are a
variety of alternatives to choose from.
2. Duration(Duration): Using the duration, we can determine the time
required for a change in alignment.
Let’s see a snippet of how to add an animatedAlign widget in the flutter
app.
AnimatedAlign(
alignment: _alignment,
duration: Duration(seconds: 2),
curve: Curves.easeInOutBack,
child: SizedBox(
width: 100.0,
height: 100.0,
child: Image.asset(
'assets/images/pluginIcon.png',
height: 40,
)),
),
As this screen has an image whose arrangement will go from
Alignment.topRight to Alignment.bottomLeft. The duration time is
also set as per our It has the option of the curve. There are many
types of curves. We have used the curves (Curves.easeInOutBack).
Let’s see a full example to better understand the AnimatedAlignment
widget.
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
static const _alignments = [
Alignment.topRight,
Alignment.bottomLeft,
];
var _index = 0;
AlignmentGeometry get _alignment => _alignments[_index % _alignments.length];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
'Animated Align',
style: TextStyle(
color: Colors.black,
),
),
centerTitle: true,
),
body: Container(
padding: const EdgeInsets.all(15),
child: Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[
AnimatedAlign(
alignment: _alignment,
duration: const Duration(seconds: 2),
curve: Curves.decelerate,
child: SizedBox(
width: 150.0,
height: 150.0,
child: Image.asset(
'assets/images/3.png',
height: 40,
)),
),
ElevatedButton(
onPressed: () {
setState(() {
_index++;
});
},
child: const Text(
'Click Me',
),
),
],
),
),
);
}
}
Output:
To compile and run the above code to need a real device or an android
emulator, read our article on how to set up an emulator for VSCode to
set up an Android emulator easily.
Conclusion:
We saw an Animated Align Widget demo in this article, which you can
modify and experiment with according to your own preferences. We
hope that this blog gives you enough knowledge to try out the
Animated Align Widget in your flutter project.
As a leading Flutter development company, we at Flutter Agency
ensure that our clients always get the top-notch mobile application that
upgrades their operational performance. Consult our Flutter expert and
get professional advice to build a great customer-centric application.
Thank you for reading our article and keep visiting Flutter Agency.

More Related Content

Similar to How to Create Animation Using the AnimatedAlign Widget.pptx

Animations - Part 2 - Transcript.pdf
Animations - Part 2 - Transcript.pdfAnimations - Part 2 - Transcript.pdf
Animations - Part 2 - Transcript.pdfShaiAlmog1
 
iOS Transition Animations The proper way to do it.pdf
iOS Transition Animations The proper way to do it.pdfiOS Transition Animations The proper way to do it.pdf
iOS Transition Animations The proper way to do it.pdfSatawareTechnologies4
 
Animations - Part 3.pdf
Animations - Part 3.pdfAnimations - Part 3.pdf
Animations - Part 3.pdfShaiAlmog1
 
What is the Hero Class in Flutter Development.pptx
What is the Hero Class in Flutter Development.pptxWhat is the Hero Class in Flutter Development.pptx
What is the Hero Class in Flutter Development.pptxBOSC Tech Labs
 
Demystifying Angular Animations
Demystifying Angular AnimationsDemystifying Angular Animations
Demystifying Angular AnimationsGil Fink
 
Rc085 010d-vaadin7
Rc085 010d-vaadin7Rc085 010d-vaadin7
Rc085 010d-vaadin7Cosmina Ivan
 
Crafting interactions with Core Animations, David Ortinau
Crafting interactions with Core Animations, David OrtinauCrafting interactions with Core Animations, David Ortinau
Crafting interactions with Core Animations, David OrtinauXamarin
 
Procedure of animation in 3 d autodesk maya tools &amp; techniques
Procedure of animation in 3 d autodesk maya tools &amp; techniquesProcedure of animation in 3 d autodesk maya tools &amp; techniques
Procedure of animation in 3 d autodesk maya tools &amp; techniquesijcga
 
Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...
Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...
Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...Katy Slemon
 
A Guide to Creating a Great Custom Tailwind Sidebar
A Guide to Creating a Great Custom Tailwind SidebarA Guide to Creating a Great Custom Tailwind Sidebar
A Guide to Creating a Great Custom Tailwind SidebarRonDosh
 
Practical animation
Practical animationPractical animation
Practical animationSV.CO
 
Сергій Міськів, «SwiftUI: Animations»
Сергій Міськів, «SwiftUI: Animations»Сергій Міськів, «SwiftUI: Animations»
Сергій Міськів, «SwiftUI: Animations»Sigma Software
 
Advance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingAdvance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingPayal Dungarwal
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapesallenbailey
 
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsAsim Rais Siddiqui
 
The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...Katy Slemon
 
Powerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentationPowerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentationDavid Raudales
 
Unit-2 swing and mvc architecture
Unit-2 swing and mvc architectureUnit-2 swing and mvc architecture
Unit-2 swing and mvc architectureAmol Gaikwad
 

Similar to How to Create Animation Using the AnimatedAlign Widget.pptx (20)

Animations - Part 2 - Transcript.pdf
Animations - Part 2 - Transcript.pdfAnimations - Part 2 - Transcript.pdf
Animations - Part 2 - Transcript.pdf
 
iOS Transition Animations The proper way to do it.pdf
iOS Transition Animations The proper way to do it.pdfiOS Transition Animations The proper way to do it.pdf
iOS Transition Animations The proper way to do it.pdf
 
Animations - Part 3.pdf
Animations - Part 3.pdfAnimations - Part 3.pdf
Animations - Part 3.pdf
 
What is the Hero Class in Flutter Development.pptx
What is the Hero Class in Flutter Development.pptxWhat is the Hero Class in Flutter Development.pptx
What is the Hero Class in Flutter Development.pptx
 
Demystifying Angular Animations
Demystifying Angular AnimationsDemystifying Angular Animations
Demystifying Angular Animations
 
Rc085 010d-vaadin7
Rc085 010d-vaadin7Rc085 010d-vaadin7
Rc085 010d-vaadin7
 
Crafting interactions with Core Animations, David Ortinau
Crafting interactions with Core Animations, David OrtinauCrafting interactions with Core Animations, David Ortinau
Crafting interactions with Core Animations, David Ortinau
 
Procedure of animation in 3 d autodesk maya tools &amp; techniques
Procedure of animation in 3 d autodesk maya tools &amp; techniquesProcedure of animation in 3 d autodesk maya tools &amp; techniques
Procedure of animation in 3 d autodesk maya tools &amp; techniques
 
Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...
Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...
Flutter hooks tutorial (part 1) flutter animation using hooks (use effect and...
 
A Guide to Creating a Great Custom Tailwind Sidebar
A Guide to Creating a Great Custom Tailwind SidebarA Guide to Creating a Great Custom Tailwind Sidebar
A Guide to Creating a Great Custom Tailwind Sidebar
 
Practical animation
Practical animationPractical animation
Practical animation
 
Сергій Міськів, «SwiftUI: Animations»
Сергій Міськів, «SwiftUI: Animations»Сергій Міськів, «SwiftUI: Animations»
Сергій Міськів, «SwiftUI: Animations»
 
Advance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.SwingAdvance Java Programming (CM5I) 2.Swing
Advance Java Programming (CM5I) 2.Swing
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapes
 
Animation in iOS
Animation in iOSAnimation in iOS
Animation in iOS
 
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
 
The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...The battle between the states (all about flutter stateless & stateful widgets...
The battle between the states (all about flutter stateless & stateful widgets...
 
Powerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentationPowerpoint 2016 transitions animations timing the presentation
Powerpoint 2016 transitions animations timing the presentation
 
Introduction to flutter
Introduction to flutter Introduction to flutter
Introduction to flutter
 
Unit-2 swing and mvc architecture
Unit-2 swing and mvc architectureUnit-2 swing and mvc architecture
Unit-2 swing and mvc architecture
 

More from Flutter Agency

Flutter for Web App Development: Exploring the Possibilities
Flutter for Web App Development: Exploring the PossibilitiesFlutter for Web App Development: Exploring the Possibilities
Flutter for Web App Development: Exploring the PossibilitiesFlutter Agency
 
Use Of AI in Custom Application Development | Quick Guide
Use Of AI in Custom Application Development | Quick GuideUse Of AI in Custom Application Development | Quick Guide
Use Of AI in Custom Application Development | Quick GuideFlutter Agency
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Flutter Agency
 
Use Firebase to Host Your Flutter App on the Web
Use Firebase to Host Your Flutter App on the WebUse Firebase to Host Your Flutter App on the Web
Use Firebase to Host Your Flutter App on the WebFlutter Agency
 
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdfAuthentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdfFlutter Agency
 
User Enhancement With Animated Flutter Drawer
User Enhancement With Animated Flutter DrawerUser Enhancement With Animated Flutter Drawer
User Enhancement With Animated Flutter DrawerFlutter Agency
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosFlutter Agency
 
Form Validation in Flutter with Laravel Form Validation Syntax
Form Validation in Flutter with Laravel Form Validation SyntaxForm Validation in Flutter with Laravel Form Validation Syntax
Form Validation in Flutter with Laravel Form Validation SyntaxFlutter Agency
 
How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?Flutter Agency
 
Benefits Of Hiring Flutter App Developers For Success
Benefits Of Hiring Flutter App Developers For SuccessBenefits Of Hiring Flutter App Developers For Success
Benefits Of Hiring Flutter App Developers For SuccessFlutter Agency
 
Guide to Fix Dropdown Button Not Switching Selected Item | Flutter
Guide to Fix Dropdown Button Not Switching Selected Item | FlutterGuide to Fix Dropdown Button Not Switching Selected Item | Flutter
Guide to Fix Dropdown Button Not Switching Selected Item | FlutterFlutter Agency
 
12 Straightforward Steps to Build Your Video On-Demand App in 2024
12 Straightforward Steps to Build Your Video On-Demand App in 202412 Straightforward Steps to Build Your Video On-Demand App in 2024
12 Straightforward Steps to Build Your Video On-Demand App in 2024Flutter Agency
 
Flutter's Advantages For Custom Application Development Services
Flutter's Advantages For Custom Application Development ServicesFlutter's Advantages For Custom Application Development Services
Flutter's Advantages For Custom Application Development ServicesFlutter Agency
 
Hire Flutter Developers to Build Cross-Platform App Services - Stonesmentor
Hire Flutter Developers to Build Cross-Platform App Services - StonesmentorHire Flutter Developers to Build Cross-Platform App Services - Stonesmentor
Hire Flutter Developers to Build Cross-Platform App Services - StonesmentorFlutter Agency
 
A Guide For Recovering Your Failing App Project | Flutter Agency
A Guide For Recovering Your Failing App Project | Flutter AgencyA Guide For Recovering Your Failing App Project | Flutter Agency
A Guide For Recovering Your Failing App Project | Flutter AgencyFlutter Agency
 
Healthcare App-Development Company Fllutter Agency
Healthcare App-Development Company Fllutter AgencyHealthcare App-Development Company Fllutter Agency
Healthcare App-Development Company Fllutter AgencyFlutter Agency
 
Is Flutter Good for Web Development? | Flutter Agency
Is Flutter Good for Web Development? | Flutter AgencyIs Flutter Good for Web Development? | Flutter Agency
Is Flutter Good for Web Development? | Flutter AgencyFlutter Agency
 
Choosing App Development: Native, Hybrid, or Flutter Explained
Choosing App Development: Native, Hybrid, or Flutter ExplainedChoosing App Development: Native, Hybrid, or Flutter Explained
Choosing App Development: Native, Hybrid, or Flutter ExplainedFlutter Agency
 
The Role of Digital Transformation in Healthcare - Flutter Agency.pdf
The Role of Digital Transformation in Healthcare - Flutter Agency.pdfThe Role of Digital Transformation in Healthcare - Flutter Agency.pdf
The Role of Digital Transformation in Healthcare - Flutter Agency.pdfFlutter Agency
 
Why-Hire-Flutter-Developer-Flutter-Agency_.pdf
Why-Hire-Flutter-Developer-Flutter-Agency_.pdfWhy-Hire-Flutter-Developer-Flutter-Agency_.pdf
Why-Hire-Flutter-Developer-Flutter-Agency_.pdfFlutter Agency
 

More from Flutter Agency (20)

Flutter for Web App Development: Exploring the Possibilities
Flutter for Web App Development: Exploring the PossibilitiesFlutter for Web App Development: Exploring the Possibilities
Flutter for Web App Development: Exploring the Possibilities
 
Use Of AI in Custom Application Development | Quick Guide
Use Of AI in Custom Application Development | Quick GuideUse Of AI in Custom Application Development | Quick Guide
Use Of AI in Custom Application Development | Quick Guide
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
Use Firebase to Host Your Flutter App on the Web
Use Firebase to Host Your Flutter App on the WebUse Firebase to Host Your Flutter App on the Web
Use Firebase to Host Your Flutter App on the Web
 
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdfAuthentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdf
 
User Enhancement With Animated Flutter Drawer
User Enhancement With Animated Flutter DrawerUser Enhancement With Animated Flutter Drawer
User Enhancement With Animated Flutter Drawer
 
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex ScenariosUnit Testing in Flutter - From Workflow Essentials to Complex Scenarios
Unit Testing in Flutter - From Workflow Essentials to Complex Scenarios
 
Form Validation in Flutter with Laravel Form Validation Syntax
Form Validation in Flutter with Laravel Form Validation SyntaxForm Validation in Flutter with Laravel Form Validation Syntax
Form Validation in Flutter with Laravel Form Validation Syntax
 
How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?
 
Benefits Of Hiring Flutter App Developers For Success
Benefits Of Hiring Flutter App Developers For SuccessBenefits Of Hiring Flutter App Developers For Success
Benefits Of Hiring Flutter App Developers For Success
 
Guide to Fix Dropdown Button Not Switching Selected Item | Flutter
Guide to Fix Dropdown Button Not Switching Selected Item | FlutterGuide to Fix Dropdown Button Not Switching Selected Item | Flutter
Guide to Fix Dropdown Button Not Switching Selected Item | Flutter
 
12 Straightforward Steps to Build Your Video On-Demand App in 2024
12 Straightforward Steps to Build Your Video On-Demand App in 202412 Straightforward Steps to Build Your Video On-Demand App in 2024
12 Straightforward Steps to Build Your Video On-Demand App in 2024
 
Flutter's Advantages For Custom Application Development Services
Flutter's Advantages For Custom Application Development ServicesFlutter's Advantages For Custom Application Development Services
Flutter's Advantages For Custom Application Development Services
 
Hire Flutter Developers to Build Cross-Platform App Services - Stonesmentor
Hire Flutter Developers to Build Cross-Platform App Services - StonesmentorHire Flutter Developers to Build Cross-Platform App Services - Stonesmentor
Hire Flutter Developers to Build Cross-Platform App Services - Stonesmentor
 
A Guide For Recovering Your Failing App Project | Flutter Agency
A Guide For Recovering Your Failing App Project | Flutter AgencyA Guide For Recovering Your Failing App Project | Flutter Agency
A Guide For Recovering Your Failing App Project | Flutter Agency
 
Healthcare App-Development Company Fllutter Agency
Healthcare App-Development Company Fllutter AgencyHealthcare App-Development Company Fllutter Agency
Healthcare App-Development Company Fllutter Agency
 
Is Flutter Good for Web Development? | Flutter Agency
Is Flutter Good for Web Development? | Flutter AgencyIs Flutter Good for Web Development? | Flutter Agency
Is Flutter Good for Web Development? | Flutter Agency
 
Choosing App Development: Native, Hybrid, or Flutter Explained
Choosing App Development: Native, Hybrid, or Flutter ExplainedChoosing App Development: Native, Hybrid, or Flutter Explained
Choosing App Development: Native, Hybrid, or Flutter Explained
 
The Role of Digital Transformation in Healthcare - Flutter Agency.pdf
The Role of Digital Transformation in Healthcare - Flutter Agency.pdfThe Role of Digital Transformation in Healthcare - Flutter Agency.pdf
The Role of Digital Transformation in Healthcare - Flutter Agency.pdf
 
Why-Hire-Flutter-Developer-Flutter-Agency_.pdf
Why-Hire-Flutter-Developer-Flutter-Agency_.pdfWhy-Hire-Flutter-Developer-Flutter-Agency_.pdf
Why-Hire-Flutter-Developer-Flutter-Agency_.pdf
 

Recently uploaded

Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Clinic
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfkalichargn70th171
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Andreas Granig
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Andrea Goulet
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxNeo4j
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit MilanNeo4j
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Maxim Salnikov
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Lisi Hocke
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMarkus Moeller
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Henry Schreiner
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...naitiksharma1124
 

Recently uploaded (20)

Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 

How to Create Animation Using the AnimatedAlign Widget.pptx

  • 1.
  • 2. How to Create Animation Using the AnimatedAlign Widget? The Flutter Agency focused on the most often used widgets while creating a Flutter app. If you have a basic understanding of those widgets, it becomes much easier for anyone to start creating wonderful apps with Flutter. Now that Flutter offers animations, you can build wonderful fun-filled animations in your app by using animated widgets. So, in this article, we will see the AnimatedAlign widget.
  • 3. To improve your application usability and performance, make sure you utilize this feature whenever you hire Flutter developer to build your business application. Sometimes you may need to change the alignment of a widget, and adding an animation can make the transition smoother during the transition to the new alignment. In Flutter, creating such animation can be done thanks easily to the AnimatedAlign widget. The Animated Align Widget aligns the child’s location in a given period in a given alignment automatically. You can also choose an animation period with a curve. The alignment to the new target will be animated by the widget.
  • 4. Let’s go over the constructor… const AnimatedAlign( {Key? key, required AlignmentGeometry alignment, Widget? child, double? heightFactor, double? widthFactor, Curve curve = Curves.linear, required Duration duration, VoidCallback? onEnd} ) There isn’t much in the constructor, other than 3 properties that are important that make the whole animation work.
  • 5. Alignment(Alignment): the initial position of the child widget. 1. Curve(Curve): In curve animation, easy curves are utilized to modify the rate of change. This enables both slow and high speeds. There are a variety of alternatives to choose from. 2. Duration(Duration): Using the duration, we can determine the time required for a change in alignment. Let’s see a snippet of how to add an animatedAlign widget in the flutter app.
  • 6. AnimatedAlign( alignment: _alignment, duration: Duration(seconds: 2), curve: Curves.easeInOutBack, child: SizedBox( width: 100.0, height: 100.0, child: Image.asset( 'assets/images/pluginIcon.png', height: 40, )), ), As this screen has an image whose arrangement will go from Alignment.topRight to Alignment.bottomLeft. The duration time is also set as per our It has the option of the curve. There are many types of curves. We have used the curves (Curves.easeInOutBack).
  • 7. Let’s see a full example to better understand the AnimatedAlignment widget. class MyHomePage extends StatefulWidget { const MyHomePage({Key? key}) : super(key: key); @override State<MyHomePage> createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { static const _alignments = [ Alignment.topRight, Alignment.bottomLeft, ]; var _index = 0; AlignmentGeometry get _alignment => _alignments[_index % _alignments.length];
  • 8. @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text( 'Animated Align', style: TextStyle( color: Colors.black, ), ), centerTitle: true, ),
  • 9. body: Container( padding: const EdgeInsets.all(15), child: Stack( alignment: Alignment.bottomCenter, children: <Widget>[ AnimatedAlign( alignment: _alignment, duration: const Duration(seconds: 2), curve: Curves.decelerate, child: SizedBox( width: 150.0, height: 150.0, child: Image.asset( 'assets/images/3.png', height: 40, )), ),
  • 10. ElevatedButton( onPressed: () { setState(() { _index++; }); }, child: const Text( 'Click Me', ), ), ], ), ), ); } }
  • 11. Output: To compile and run the above code to need a real device or an android emulator, read our article on how to set up an emulator for VSCode to set up an Android emulator easily.
  • 12. Conclusion: We saw an Animated Align Widget demo in this article, which you can modify and experiment with according to your own preferences. We hope that this blog gives you enough knowledge to try out the Animated Align Widget in your flutter project. As a leading Flutter development company, we at Flutter Agency ensure that our clients always get the top-notch mobile application that upgrades their operational performance. Consult our Flutter expert and get professional advice to build a great customer-centric application. Thank you for reading our article and keep visiting Flutter Agency.