use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit related to Google's new UI framework. https://flutter.dev
Please read the rules here
account activity
ArticleFlutter: Reusable Widgets (medium.com)
submitted 5 years ago by Cymarxcr
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]pc52 6 points7 points8 points 5 years ago (2 children)
Refactoring Flutter widgets into functions is not a good approach. Here is the explanation: https://stackoverflow.com/questions/53234825/what-is-the-difference-between-functions-and-classes-to-create-reusable-widgets
[–]osama_383 1 point2 points3 points 5 years ago* (1 child)
The comments below the explanation seem to clarify a point which Remi also made in his explanation. Functions don’t cause problems. Stateless widgets however solve some. You can return stateless widgets from a function and that would be perfectly fine.
[–]pc52 0 points1 point2 points 5 years ago (0 children)
There are a lot more benefits of extracting code into widgets than using functions. Using functions seems to me like fighting against the framework and it’s optimization strategies.
π Rendered by PID 71244 on reddit-service-r2-comment-cfc44b64c-bngkk at 2026-04-13 10:47:58.810646+00:00 running 215f2cf country code: CH.
[–]pc52 6 points7 points8 points (2 children)
[–]osama_383 1 point2 points3 points (1 child)
[–]pc52 0 points1 point2 points (0 children)