Filter
Exclude
Time range
-
Near
Replying to @SEGVeenstra
My apologies, I should not write at 2AM. UseCases should not depend on presenters. Got a repo I can look at? This presents the typical problem when you're applying Uncle Bob's CA to Flutter. It just makes it too complicated. I often follow some level of clean architecture, usually at the higher levels but the more you throw out the better. KISS - Keep it simple, silly. This often results in disgruntled people on the team thinking there should be more complexity. ๐Ÿ™‚ I don't think you need a controller and a presenter. And both are bets inside the widget. I use to give talks in MVC, MVVM, etc in various UI platforms. The point of the talk is "it's all BS." It's too simple and doesn't give the whole picture, things are often misnamed. In all platforms. In Flutter it's even worse. It sounds like you are intentionally trying to show all layers, that's the point of your exercise. So the way you could go that is have the UseCase passed to a presenter, presenter passed to controllers (StatefulWidget?) and the View is a StatelessWidget. Each later calls functions on the other. That'd a lot of work. Another great way to detangle the mess is to use FlutterBus to decouple each part from each other and just use the event as the router of the messages. (Or my formerly popular Swing EventBus for Swing) Because "widgets all the way down" this really makes no sense at all in Flutter, despite the bazillion blog posts on how it does. In Swing it would make sense, kinda, the component has a controller. Higher level useCases can compose them and you pass references around. In C#, MVVM is beautiful. Again, there's a composition of UI components by other code. It's procedural and not declarative. In Flutter, you declare Widgets. It's not a procedural paradigm like Swing or C#. The entire build method and all the methods it depends on, is a controller, but you don't have to name it. YAGNI - You ain't gonna need it - adding in more layers just adds unnecessary complexity. A StatefulWidget already has a model and its methods are the presenter or controller, whatever you might call it, adding in another layer shifts away from the beauty that is flutter. The view and controller/presenter is a Widget, similar to Swing (not surprising since Dart comes from Java and was led by many of the same people). Beyond the widget tree, there's only reactive state that's not in a widget. A BLoC, Cubit or Provider (Riverpod) is passed to the widget. The widget updates the state and the useCase reacts. So your widget calls ref.read(incrementUseCaseProvider).call(), the use case does its thing, and state is updated. The updated state triggers The rebuild, the widgets rebuilds declaratively. No Presenter. No Controller. Clean and idiomatic.

4
3
73
ุจุณู… ุงู„ู„ู‡ ุชูˆูƒู„ุช ุนู„ู‰ ุงู„ู„ู‡ Heading to Saudi Arabia #GDR 8000 km of travelling in one week 6 @FlutterDev talks 5 cities see you all soon :) @abid_salim @nlycskn @Omranic @GCDCSaudi @GoogleDevExpert @FlutterEgypt #Flutter #FlutterBus
6
4
34
Finally, July finished!,I conducted 6 @FlutterDev talks 5 #Flutter workshops 3 different countries two continents in the same month, I think I should take some rest #FlutterCommunity #FlutterBus #StudyJamMENA @GoogleDevExpert @googledevs @abid_salim @Omranic @nlycskn
2
1
34
2 Jul 2019
1
1
19 Jun 2019
1
1
7
12 Feb 2019
ุงูˆู„ ุงุจู„ูŠูƒูŠุดู† ู„ูŠุง ุจูู„ุงุชุฑ ุจุนุฏ ุงู„ StudyJam ููŠ ุงู„ู…ู†ุตูˆุฑุฉ โฆโค๏ธ 2 Codelabs Accomplished github.com/Awamy/FlutterStudโ€ฆ @dahabdev @abid_salim @googledevs #TOTMENA #StudyJamMena #FlutterBus #Flutter #FlutterEgypt
2
9
My @flutterio talks & #FlutterStudyJam in #Alexandria Done! It was a full #Flutter day! 2 talks 2 workshops on the same day heading to #Cairo for my talks tomorrow @abid_salim @Omranic @googledevs @GoogleDevExpert #StudyJamMena #TOTMENA #FlutterBus
4
41
Heading back to #Egypt after #DevRel #TOTMENA I give 8 @flutterio talks & 8 #FlutterStudyJam in 7 different cities & 2 different countries & 6 airplanes โœˆ more than 6000 km of travelling in 9 days๐Ÿš€ @abid_salim @Omranic @googledevs @GoogleDevExpert #FlutterBus #Flutter
2
1
26
With my #Dash Preparing for my @flutterio & #FlutterStudyJam after 2 hours today in #makkah #FlutterBus #Flutter
1
3
36
@dahabdev giving his awesome Flutter Study Jam๐Ÿคฉ!!! #Flutter #FlutterBus #StudyJamMENA #GCDCSaudi
2
2
8
My @fluutterio #Dash tired and needs some coffee to be focused today with me ๐Ÿ˜ #FlutterBus #TOTMENA #FlutterStudyJam
4
16