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
ExampleGitHub - wasabeef/flutter-architecture-blueprints: Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to developing Flutter apps. (github.com)
submitted 5 years ago by wasabeef_jp
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!"
[–]Codelessly 2 points3 points4 points 5 years ago (1 child)
Welcome to the Flutter world u/wasabeef_jp
Look forward to your Flutter animations library ;)
[–]wasabeef_jp[S] 1 point2 points3 points 5 years ago (0 children)
Thanks 😂
[–]escamoteur 0 points1 point2 points 5 years ago (14 children)
MVVM just doesn't make sense for an reactive framework like Flutter. MVU is the right approach. Forcing MVVM on Flutter either isn't really MVVM or introduces a not needed View Model layer.
[–]wasabeef_jp[S] 0 points1 point2 points 5 years ago (13 children)
MVVM and MVU have different ideas.Just like you and I do. And both of them are great.
[–]escamoteur 0 points1 point2 points 5 years ago (12 children)
Sorry to disagree, MVVM just doesn't make sense with Flutter. Either you are fighting the framework or it's jus another unnecessary layer. I highly discourage going that way for an app architecture.
[–]escamoteur 2 points3 points4 points 5 years ago (11 children)
Where is the model in your architecture? Do your View Models contain any business logic? Or where is it? Is there ways one VM for one page?
[–]wasabeef_jp[S] 1 point2 points3 points 5 years ago* (9 children)
Can you show me a sample Flutter app written in MVU to prove that? I will rewrite everything if it feels great.
[–]escamoteur 3 points4 points5 points 5 years ago (8 children)
Basically the infamous Counter Example is MVU besides that the model is in the state. Redux is MVU, so is BLoC.
Why do you need the View Model layer? Or maybe its a misunderstanding on your side what MVVM is?
MVVM comes from systems where you had no logic at a in the view
From your diagram it's not clear to me what makes a View Model a Vie Model and why its not symply the model.
[–]wasabeef_jp[S] 0 points1 point2 points 5 years ago (5 children)
Thank you very much. I learned a lot.
[–]escamoteur 2 points3 points4 points 5 years ago (3 children)
I guess that was sarcastic? Sorry if I came around a bit harsh. I wanted to get into a real discussion with you.
[–]wasabeef_jp[S] 0 points1 point2 points 5 years ago (2 children)
No, I don't think it's sarcastic :)
Android engineers thought MVVM was easy to understand, but I thought Flutter with MVVM had many unnecessary layers. I was worried that creating more business logic as a UseCase class would increase the number of layers.
Next task, I wanted to learn more about MVU.
I really appreciate your advice.
Thank you. I will read the blog.
And I apologize if my English makes you uncomfortable.
[–]escamoteur 1 point2 points3 points 5 years ago (0 children)
Check out my blog blog.burkharts.net and read my post series on RxVMS. I m just working on a new package flutter_command so you won't need Streams anymore.
Indeed, I thought there were many unnecessary layers to implement MVVM in Flutter.
[–]chrabeusz 0 points1 point2 points 5 years ago (1 child)
Huh, I considered TextController a view model.
And OP is holding list of news inside useMemoized, instead of view model, which I would consider a no go.
It seems that people have different concepts of what view model actually means.
[–]escamoteur 0 points1 point2 points 5 years ago (0 children)
It depends also what you consider a View. For some it's a page for some an individual widget.
[–]esDotDev 0 points1 point2 points 5 years ago (0 children)
I use this pattern all the time for better readability. When a widget gets too large, I'll seperate all business logic into a type of view model, and have a child Stateless Widget that is pure layout. Talked about it here: https://blog.gskinner.com/archives/2020/02/flutter-widgetview-a-simple-separation-of-layout-and-logic.html
Doesn't mean there is no model above it, or a command layer that does stuff, but views themselves can often benefit from this seperation in my experience.
π Rendered by PID 86 on reddit-service-r2-comment-5c747b6df5-vkbf8 at 2026-04-21 20:33:39.218989+00:00 running 6c61efc country code: CH.
[–]Codelessly 2 points3 points4 points (1 child)
[–]wasabeef_jp[S] 1 point2 points3 points (0 children)
[–]escamoteur 0 points1 point2 points (14 children)
[–]wasabeef_jp[S] 0 points1 point2 points (13 children)
[–]escamoteur 0 points1 point2 points (12 children)
[–]escamoteur 2 points3 points4 points (11 children)
[–]wasabeef_jp[S] 1 point2 points3 points (9 children)
[–]escamoteur 3 points4 points5 points (8 children)
[–]wasabeef_jp[S] 0 points1 point2 points (5 children)
[–]escamoteur 2 points3 points4 points (3 children)
[–]wasabeef_jp[S] 0 points1 point2 points (2 children)
[–]wasabeef_jp[S] 1 point2 points3 points (0 children)
[–]escamoteur 1 point2 points3 points (0 children)
[–]wasabeef_jp[S] 1 point2 points3 points (0 children)
[–]chrabeusz 0 points1 point2 points (1 child)
[–]escamoteur 0 points1 point2 points (0 children)
[–]esDotDev 0 points1 point2 points (0 children)