DEV Community

Discussion on: Building Twitter layout with Flutter

Collapse
 
gildaswise profile image
Gildásio Filho

Hey, this was an amazing write up and it's nice to see Flutter getting used more in Brazil, but you should take note to the fact that splitting widgets to methods is a performance antipattern. I will also update mine fixing this problem (and also adding BLoCs!) but yeah, we shouldn't really use manual widgets outside of the build method.

Collapse
 
leoat12 profile image
Leonardo Teteo • Edited

Great to know, but I was just following the documentation on this:

To minimize the visual confusion of deeply nested layout code, place some of the implementation in variables and functions.
Source

It is probably because it is a starter level tutorial and they didn't want to complicate things, maybe it is written somewhere in the more advanced documentation, but I will keep that in mind.

Collapse
 
gildaswise profile image
Gildásio Filho

Sadly the documentation is very basic (for now, I hope) and doesn't cover most of the best practices, so most things are still being discovered by the community.

Thread Thread
 
leoat12 profile image
Leonardo Teteo

Well, we can say that it is the very best way to learn something, when it is still new and there are many details to discover. :)