Using BLOC pattern with SSE

I have been using BLOC pattern in my project. I had to use SSE(Server sent Events) for a function.I am really confused on how to handle this with bloc pattern.I tried...

Flutter BLoC event race condition

Let's assume we have an app where user has a calendar where he can select a date for which he wants to get list of events. When user selects the date, we add an event...

Flutter - Dependent dropdown menu using BloC

I am trying to create three dropdown menu School, Class and Group in a page and populating the menus from different APIs. Here School is a standalone dropdown, while C...

When to create new bloc?

I'm still learning bloc patter. I created two pages, ViewPage and DetailsPage using a single bloc. This is my bloc: <pre><code>getRecordEvent deleteRecordEvent Loa...

How many props are too many to emit at once per given state in Flutter Bloc Pattern

I have a Bloc for a feature which has related fields. When passed an Event, the respective state Emits its props. Each Bloc State undergoes a computation unique to its...

Flutter BLoC:Global exception handler for mapEventToState

I use felangel's bloc library. I fetch data by using a repository in mapEventToState method .If the repository throws an exception, I want to catch it on a global exce...

Testing BLoC that uses a reactive repository returning a Stream

I'm testing my Flutter mobile application. I'm using <code>flutter_bloc</code> as state management solution and <code>bloc_test</code> to test my BLoCs. My appl...

Bad state: Tried to read a provider that threw during the creation of its value. The exception occurred during the creation of type HomeBloc

I added multiple blocs in my main file and use 1 bloc for every single screen, but when i go to next screen and come back to previous screen then again try to trigger...

BlocBuilder not updating after change

I have a bloc to manage all the quotations in the application. The quotation class, bloc, and events are given below: I have a form in which on selecting the te...

Persisting State using Hydrated Bloc version 5 and above

<strike> I am trying to use Hydrated Bloc to persist the state in my app. The tutorials I have found are all using previous versions of Hydrated Blocs and use the <cod...

Using Flutter bloc to set loading state during API call

I am learning flutter_bloc and now i am aware now about it.I know how it used when fetching some data from server and then showing in widgets let's suppose list of ite...

Moor with bloc authentication

I am developing a Todo flutter app and I am using <code>flutter_moor</code> and <code>bloc</code> and I want to achieve the following in the best and most secure way:<...

flutter - bloc - how can I use FutureBuilder in my Ui to properly implement Bloc Architecture

I am newbie to flutter and Bloc architecture and I am trying to use Bloc for my login functionality. I am trying to make a call to a function in my Bloc file, but I do...

Bloc pattern does not show newly added user to sqflite on screen

I am using <code>sqflite</code> database to save user list. I have user list screen, which shows list of user and it has a fab button, on click of fab button, user is...

How to call 2 Future functions that return Future values in FutureBuilder?

I am working on a complex web application in which from time to time, I need to fetch data from backend API. Sometimes, I need to call 2 future functions in Future Bui...