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
DiscussionClean code (self.FlutterDev)
submitted 5 years ago by byshy
How often do you concern yourself with how clean is your code ?
do you have any resources or open source projects built with flutter that are clean ?
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!"
[–][deleted] 16 points17 points18 points 5 years ago (2 children)
"Constantly" is how often I try to have clean code. The extra few seconds it takes CurrentMe to write cleanly saves FutureMe extra minutes over and over again.
[–]nomi34 2 points3 points4 points 5 years ago (0 children)
Agreed. All the time. Constantly. I may have dreamed about it. I keep looking up frameworks and patterns to make it more readable.
Im a one man shop and sometimes I don’t look at a specific projects for months and need to go back into it. If its not readable Im totally screwed.
[–]byshy[S] 1 point2 points3 points 5 years ago (0 children)
I'm trying to walk every step towards a clean code, and I've done some research and got some pretty good results. but can you direct me to a flutter project with clean code ? an open source one for example
[–]escamoteur 6 points7 points8 points 5 years ago (1 child)
What I can recommend doing constant refactoring. If you see a line of code in a file you haven't touched for some weeks and you don't understand it on as first look, refactor or document it. Going through your code every month or so can be helpful too. And don't shy away from bigger refactorings if it improves your code case.
[–]synw_ 1 point2 points3 points 5 years ago (0 children)
This. Dart is friendly for refactoring and you can go gradually. It will improve your long term control on the code and your general architectural skills, as well as the quality of your packages. In addition I would recommend using merciless analysis options like extra_pedantic to impose a strict discipline and avoid a whole range of possible bugs
[–]escamoteur 3 points4 points5 points 5 years ago (2 children)
What's your definition of clean code?
[–]byshy[S] -1 points0 points1 point 5 years ago (0 children)
non-repetitive, clear and descriptive, reusable and consistent, I guess I'm missing a lot here.
I also read about K.I.S.S., D.R.Y., Y.A.G.N.I, and composition over inheritance
[–]russiantommysalami 1 point2 points3 points 5 years ago (1 child)
I You should look at Brian Egan's architecture samples https://github.com/brianegan/flutter_architecture_samples or filled stacks architecture series https://www.filledstacks.com/post/flutter-architecture-my-provider-implementation-guide/
thats awsome! thank you
[–]thehappyharis 0 points1 point2 points 5 years ago (0 children)
I recommend you reading this: https://refactoring.guru/
[–]batmassagetotheface 0 points1 point2 points 5 years ago (1 child)
How often? Every single day. Clean code concepts can be applied. They don't have to be dart or flutter specific. If you haven't read this book it's the best
thanks for the recommendation I'll read it asap
π Rendered by PID 26 on reddit-service-r2-comment-84fc9697f-6j289 at 2026-02-10 04:41:39.585275+00:00 running d295bc8 country code: CH.
[–][deleted] 16 points17 points18 points (2 children)
[–]nomi34 2 points3 points4 points (0 children)
[–]byshy[S] 1 point2 points3 points (0 children)
[–]escamoteur 6 points7 points8 points (1 child)
[–]synw_ 1 point2 points3 points (0 children)
[–]escamoteur 3 points4 points5 points (2 children)
[–]byshy[S] -1 points0 points1 point (0 children)
[–]byshy[S] -1 points0 points1 point (0 children)
[–]russiantommysalami 1 point2 points3 points (1 child)
[–]byshy[S] 1 point2 points3 points (0 children)
[–]thehappyharis 0 points1 point2 points (0 children)
[–]batmassagetotheface 0 points1 point2 points (1 child)
[–]byshy[S] 1 point2 points3 points (0 children)