Learn Flutter Clean Architecture & TDD - Full Course (Flutter Tutorial)
Why Stack Overflow recommends it
Stack Overflow users link it as the tutorial they are following when asking about Flutter clean architecture, BLoC, and the errors that appear when its code meets newer package versions.
Recommended by 1 people across 1 different months, 2020 to 2022.
What it is
A seven-hour full course by Reso Coder that builds a Number Trivia app in Flutter using clean architecture and test-driven development. It covers separating code into presentation, domain and data layers, dependency injection, and BLoC-based state management, with written tutorials accompanying each part.
What people said
Recommends Matthew Trent · 2022-09 · Stack Overflow · on “Flutter: State management”
My new state management lib recommendation: I recommend just using Trent ( [LINK] ) for state management. It's like BLoC, but simpler. Lots of examples in the README on GitHub. Full disclosure: I made it. Old answer: BLoC/Cubit BLoC is great for complex state management for complex apps. However, inside the BLoC library there's a simpler way of managing state that's called Cubit (Cubit is sort of a subset of BLoC). Cubit is largely the same as BLoC except: less boilerplate doesn't use 2-way streams This renders it much easier to learn, and a fantastic stepping-stone into a full-out BLoC driven state management solution. Currently, my team and I are building a very complex app, and we use the
Cites Borislav Nanovski · 2020-03 · Stack Overflow · on “Flutter BlocListener executed only once even after event gets re-fired”
I am implementing Reso Coder's clean architecture [this video] in flutter. I followed his guides in dividing the project to layers and using dependency injection. In one of the cases I want to have the following scenario: An administrator user logs in, sees data on their home screen, edits it and by pressing a button, saves the data to the local db (sqflite). Upon saving the data I want to show a Snackbar with some sort of text "Settings saved!" for example. Here's my code (parts): class AdministratorPage extends StatefulWidget { @override _AdministratorPageState createState() => _AdministratorPageState(); } class _AdministratorPageState extends State<AdministratorPage> { Widget build(BuildContex
Cites Frank Cazabon · 2021-05 · Stack Overflow · on “How to fix this Flutter error: The superclass 'Bloc<NumberTriviaEvent, NumberTriviaState>' doesn't have a zero argument constructor”
I'm following this tutorial: [this video] Unfortunately I have the latest version of FLutter and also installed th elatest versions of all th e dependencies, so the code has to change for some breaking changes. I get this error: The superclass 'Bloc<NumberTriviaEvent, NumberTriviaState>' doesn't have a zero argument constructor. Try declaring a zero argument constructor in 'Bloc<NumberTriviaEvent, NumberTriviaState>', or explicitly invoking a different constructor in 'Bloc<NumberTriviaEvent, NumberTriviaState>'. This is the relevant part of the code: class NumberTriviaBloc extends Bloc<NumberTriviaEvent, NumberTriviaState> { final GetConcreteNumberTrivia getConcreteNumberTrivia; final GetRandomNu
Cites Mackovich · 2021-10 · Stack Overflow · on “Flutter: Using JsonSerializable with inheritance with clean architecture”
I am trying to follow the Clean Architecture via this [this video] and because of that I have a set of models objects in the data layer that extends the entities objects. Since I have many models, some of which having many fields, I wish to use json_serializable package in order to auto generate the boilerplate code that are the factories and relevant toJson and fromJson converters methods. However when running: flutter pub run build_runner build It fails: [SEVERE] Could not generate fromJson code for servers because of type Server . My data architecture is as follow, in the data layer: - HostModel extends Host(Entity) - String name, - List<ServerModel> servers, - ServerModel extends Server(Entit