Hero Widget In Flutter? Have you heard of it....
You would have seen some nice animation while navigating to another screen in some apps right? May be you would be thinking like they are using some custom animation for that? huh!
Well certainly we can also use custom navigation for this, But flutter is offering similar kind of widget for this, I think most probably No one will be heard of this right? So lets begin.
Here we just want to use the Hero Widget like other widgets where it we want to look forward for two properties of this widgets that is Tag and child. I think probably everyone will be familiar with child property. So what is the main use of tag?
The main use of tag is to identify which hero animation should be triggered when we are using it. For that we need to use the same tag name for the other Hero Widget. So where should we place the other widget? we need to use the next hero widget with the same tag and the same child property on the next screen following to it. so that we will get the correct smooth animation.
So I hope you got a clear idea for how to use the HERO WIDGET. So don't waste time make use of the hero widget and provide an amazing UI to your application.
If you find this useful please don't forget to share this , and follow on INSTAGRAM where I share useful content for Flutter and more.
follow on Instagram
Flutter Developer | Mentor | Freelance Specialist | Full stack Developer
2 年Thank you for the share.
Software Developer at IBM
2 年????