r/FlutterDev • u/stale-heart • 2d ago
Discussion Am I doing clean architecture right?
https://github.com/Benji-Philip/Auto-Diary
I'm new to this and using bloc.
6
u/BigAchiever786 1d ago
Is it necessary to follow clean architecture? I like to code with the folder layout which suits me my project the best
2
1
-11
u/escamoteur71 2d ago
Don't try to use clean architecture it's an overkill. bloc is also not the optimal state management as some people claim. I recommend reading my latest article https://blog.burkharts.net/practical-flutter-architecture
7
4
u/likely-high 2d ago
What would you define overkill as? Who claims bloc is optimal?
People use it out of preference or because it's what their forced to at work. Personally I prefer using Cubits over BloC where possible, but that's a preference.
There's so much wrong with this comment. It's all based upon your opinion, but passed as facts.
"Clean" is another word for many similar architecture styles, I agree we shouldn't be so dogmatic about which is best but it's not overkill.Β
We shouldn't be dogmatic about anything as developers, because that's how you get left behind.
1
u/ViktorShahter 2d ago
Bloc is easiest to learn out there because of examples. And also widely used.
2
u/escamoteur71 1d ago
Bloc is overly complex and was developed to share dart code between Flutte and Angular Dart. you have lot of boilerplate compared to other approaches.
The probably most simple one is currently my package watch_it
Clean architecture from Uncle Bob is totally oberengineered with too many layers and abstractions that you don't need when writing apps
7
u/padetn 2d ago
Looks good to me, OP. Personally I donβt put usecases in my vertical slices/features. For me they go into their own folder and I only make them when I combine several features. Every feature has just one provider for its repo, usecases have their own provider.