|
- What is the difference between Cubit and Bloc? - Stack Overflow
So, we can use Cubit for simple states, and as needed we can use the Bloc UPDATE: additional comparison There are many advantages of choosing Cubit over Bloc The two main benefits are: Cubit is a subset of Bloc; so, it reduces complexity Cubit eliminates the event classes Cubit uses emit rather than yield to emit state
- flutter - How to make a bloc global accessible - Stack Overflow
The BLoC pattern is better used to manage state of a single specific widget like a screen by example The BLoC pattern is not use by a single specific widget but use for each UI feature
- flutter - Modal Bottom Sheet and Bloc - Stack Overflow
Actually if you need this bloc only in bottom sheet and nowhere else, the better and cleaner solution is create the StatefullWidget for bottom sheet content, create the Bloc inside this widget in initState() work with bloc in build() method and free resources in dispose() method
- Can anyone tell the difference of flutter_bloc and bloc packages in . . .
The 'bloc' package contains things you will use in your Bloc layer, like the Bloc class This isn't necessarily flutter dependent, it is just the logic architecture of your app The 'flutter bloc' package contains elements you will use in your UI layer
- Bloc, Flutter and Navigation - Stack Overflow
Navigating with Bloc in Flutter can indeed seem a bit tricky at first, especially if you're trying to adhere strictly to architectural principles In Bloc architecture, the idea is to keep the Bloc focused on business logic and state management, while delegating UI-related actions, such as navigation, to the widgets or the UI layer
- BlocProvider. value Vs BlocProvider (create:) - Stack Overflow
when you have already created a bloc in a different BlocProvider and you just want that same bloc to be available somewhere else in the widget tree I'm assuming that because this bloc wasn't created by the BlocProvider you're currently using (with BlocProvider value) it won't handle closing the bloc - that will be done by the original
- flutter - MVVM vs Bloc patterns - Stack Overflow
BLoC and MVVM seemed to be different when BLoC was introduced, but that differences faded away as BLoC implementations changed over time Right now the only real difference is that BLoC doesn't specify a separate presentation logic and business logic, or at least it doesn't do it in an obvious manner
- Why (usually) theres a repository layer on BLoC pattern?
Here is an excellent summary of the why And it makes complete sense This is from the BLoC documentation, where they detail a weather app tutorial that uses a Repository layer (see here for the full article) "The goal of our repository layer is to abstract our data layer and facilitate communication with the bloc layer
|
|
|