Hero Widget In Flutter? Have you  heard of it....
For More follow @pen_storie_

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!

No alt text provided for this image

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.

No alt text provided for this image
Follow @pen_storie_ for more

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?

No alt text provided for this image
follow @pen_storie_ for more

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.

No alt text provided for this image
Follow @pen_storie_ for more

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.

No alt text provided for this image

follow on Instagram

Mohammed Sufiyan as

Flutter Developer | Mentor | Freelance Specialist | Full stack Developer

2 年

Thank you for the share.

Ariya Das

Software Developer at IBM

2 年

????

要查看或添加评论,请登录

社区洞察

其他会员也浏览了