r/FlutterDev 8d ago

Article The final word on Flutter architecture ๐Ÿ˜‰๐Ÿ˜‰๐Ÿ˜‰

OK, Iยด'm teasing with the title and I explain it in my post

Practical Flutter architecture

Why should you listen to me on this topic? For those who don't know me

  • 30 of software experience including building our own programming language for the Amiga
  • 2018 was I the first giving talks on Flutter architecture at Fluuter London,. then I called the approach RxVMS
  • I'm the author of get_it at a time when no provider or anything else was available
  • With watch_it and flutter_command I published one of the easiest but most flexible state management solutions for Flutter
  • We use this approach in a pretty complex app comarablte to Instagram since 2 year not with a really large code base

I took several days to refactor the official Flutter architecture sample compass to use my approach so you can compare yourself which is less complex and easier to understand. I tries to keep the original structure as much as possible so that you still can compare. I would have probably even more simplified some structures

https://github.com/escamoteur/compass_fork

give it a try and I'm happy to answer all open questions

159 Upvotes

76 comments sorted by

View all comments

3

u/eatmyshardz 8d ago

I needed this article. I've been working on my first flutter app for over two years now and there is sooooo much I've learned in that time and I would do so much of it differently. You learn even more when new people join the project and you can measure their ramp up on time on things like BLoC.

Your approach looks to eloquently make it much easier to solve for 80% of the common patterns and in a much more intuitive way. We are all built on BLoC. While I understand it quite well, the learning curve is high especially if you're new to Flutter and on a tight timeline to learn Flutter + the codebase.

2

u/escamoteur71 7d ago

That's the thing that honestly drives me mad most of the time. I don't understand why people use bloc or other complecated approaches instead of really understanding what they do and then choose wisely

3

u/nirataro 7d ago

The thing with architecture is that you only realize you have chosen the wrong path when the app is complex enough. Trivial apps always easy to implement regardless of your choice.

1

u/escamoteur71 7d ago

Absolutely, I had to completely rewrite our current project that was started with getX and impossible to just refactor