messy is not the same as dirty. This semantical confusion unfortunately prevents his argument about the messy room to be valid. (I am one of those guys who prefer the messy room, as long as it is not dirty) (My girlfriend does not agree with me, though.)
3:05 is NOT cleaner, and smaller than 1:07, you just created a bad abstraction with an ugly switch under the hood, an error in that switch will cause errors everywhere. Each of the 1:07 widgets, have one goal, easy to understand, and easy to maintain.
Any pythonic-like recommendation on best-practices for flutter/dart that professionals use for large apps? 1) setting up a project (folder structure, settings json file edits, packages or vscode extensions (ex. lint)) 2) style (function/variable name format, camel, etc) 3) themes 4) stateless vs stateful tips
I agree it's ugly code too much chaining there's no need for that switch just create 3 different buttons and that will work much faster and cleaner and easy to maintain
Good advice just two comments. First, you missed to comment you second point about named constructors. Second, making a custom class for your input can backfire quite often. You don't want tons of small custom classes only used once in your code. That will make the functions harder to use. Anyone using them has to find that small custom class in the code and create an object to use the function. This will make the function more confusing to understand and therefore it will be less used by everyone else. If the class/and object you require is something more natural and reusable it is another story.
upon yr second comment, i totally aggree with it, as i felt it today i would like to share my GitHub reop for the project that i tried to make it perfect. However, it turnned into a complicated class when a new variable is added
I liked the first tip, it seems to me more understandable, but how to implement the actionFunction(Action action) function? I only get it void actionFunction(Action action) { if (action == Action.add) { print("add"); } }
I subscribed but I unsubscribed because there is no need for talking trash it's a bad habit even your content is great but you won't get subscribers this way
Then go to dirtiest toilet...... Cracked me up 🤣🤣
🤣😂 Me too. I paused and was like whaaat? I like this guy 👍👊
messy is not the same as dirty.
This semantical confusion unfortunately prevents his argument about the messy room to be valid.
(I am one of those guys who prefer the messy room, as long as it is not dirty)
(My girlfriend does not agree with me, though.)
3:05 is NOT cleaner, and smaller than 1:07, you just created a bad abstraction with an ugly switch under the hood, an error in that switch will cause errors everywhere. Each of the 1:07 widgets, have one goal, easy to understand, and easy to maintain.
Any pythonic-like recommendation on best-practices for flutter/dart that professionals use for large apps?
1) setting up a project (folder structure, settings json file edits, packages or vscode extensions (ex. lint))
2) style (function/variable name format, camel, etc)
3) themes
4) stateless vs stateful tips
I agree it's ugly code too much chaining there's no need for that switch just create 3 different buttons and that will work much faster and cleaner and easy to maintain
Good advice just two comments.
First, you missed to comment you second point about named constructors.
Second, making a custom class for your input can backfire quite often. You don't want tons of small custom classes only used once in your code.
That will make the functions harder to use. Anyone using them has to find that small custom class in the code and create an object to use the function.
This will make the function more confusing to understand and therefore it will be less used by everyone else.
If the class/and object you require is something more natural and reusable it is another story.
upon yr second comment, i totally aggree with it, as i felt it today
i would like to share my GitHub reop for the project that i tried to make it perfect. However, it turnned into a complicated class when a new variable is added
What are the advantages of creating that enum and switch vs passing the function directly as an argument?
it depends on your use case. you can try both and see which one seems understandable
I liked the first tip, it seems to me more understandable, but how to implement the actionFunction(Action action) function? I only get it
void actionFunction(Action action) {
if (action == Action.add) {
print("add");
}
}
Bro you are amazing :)
Good tips buddy, thank you!
Any time!
If notLoggedInUserGoToSettings, maybe would be time to go to settings?
thanks for tips❤️️
No Problemo!
Any tips to cleanup bracket hell?
Extract your widgets to individual widgets
Tip 3 is excellent
Thank you!
You're welcome!
Thanks man learned some tips today ;D
Glad I could help
I'm just move from JS to Flutter (dart), and looking for best practices to code dart.
Agreed to first tip, but the rest of tip is not very practical.
Thanks for this, it’s very nice to follow.
Glad it was helpful!
3:05 Seriously?
Your save/edit/delete buttons are a mess. At least use a state pattern, but then you would notice that this splitting this widget made no sense
4:55 Naming lists of strings as singulars is also confusing
Good point there!
I subscribed but I unsubscribed because there is no need for talking trash it's a bad habit even your content is great but you won't get subscribers this way
some really nice tips! thanks!
Glad you like them!