My FeedDiscussionsHashnode Enterprise
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Alex Sinelnikov

5 likes

·

1.2K reads

2 comments

Yuriy Novikov
Yuriy Novikov
Aug 1, 2024

Thanx for the article. You use Visibility to show an appropriate view. Is it to eliminate if...else? Any drawbacks of such a technique? Are hidden widget trees still there... or not?

1
·
·1 reply
Alex Sinelnikov
Alex Sinelnikov
Author
·Aug 1, 2024

Yes, visibility widgets, even when hidden - stays in widget tree, but you can set replacement widget, by default its SizedBox.shrink().

In my case I didn't want if/else in that part of code and used Visibility()

1
·