This is an interesting one, but I got the Flutter counter app running as a CLI, Dart web app, Flutter app and API. π
This uses clean architecture and riverpod π₯
github.com/rodydavis/flut
Conversation
Replying to
I also came across the file package which even made it possible to mock the file system π€―
1
2
Another thing I have started doing is putting tests right beside the source files and running them with the following command:
flutter test lib/**/*_test.dart
1
2
This uses riverpod outside flutter too, and this issue was helpful:
1
1
This may seem like a lot for just the default counter app, but I wanted to showcase the ease of deployment of the business logic.
Once you have the logic done you just need to render it and trigger state changes.
1
2
Even riverpod is completely optional here, but it does make exposing classes very nice.
I have started to include a 'module.dart' containing all the classes I want to expose for a directory and using the riverpod generator to save some boilerplate.
1
1
Adding to the app should be easy since you can define new use cases, add new sources (or implementations) and new repositories.
Something that stuck with me after reading Clean Architecture book is that it doesn't matter what kind of app you are building for this
1
Nice!
As comparison, not too far from the architecture I presented at Flutter Vikings, entirely based on Riverpod and inspired by Architecture Components:
Quote Tweet
My talk about Flutter Architecture Components at @FlutterVikings #fluttervikings , my slides and my sample code, all in one tweet 

enjoy!
(HD)
youtube.com/watch?v=OzkNiD
(1st)
youtube.com/watch?v=-BcQAW
(slides)
docs.google.com/presentation/d
(code)
github.com/alesalv/flutte
1
2
6
I just sat down to take another look into Rody's fork and I decided to open Twitter for a second and saw this tweet at top! I knew about this talk. It's so nice to watch it on YouTube with GH link. Thanks!
1
2
Show replies



