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...

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...

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...

Bloc error apiState dataloading isnt a type. Try correcting the name to match an existing type ,showing error with freezed package

i am trying to learn bloc with freezed .Everything was fine in event,state & bloc but when i am trying build with blocbuilder,this error occured while implementing...

BlocProvider.of() called with a context that does not contain a Bloc/Cubit of type WeatherBloc

I'm trying to add a My Location button to search screen. This button must get current geolocation. But there is some error comming up and button does nothi...

Flutter: Stream data from rest api using Cubit

The idea is to fetch data from api continuously and show this data in screen, without need to fetch manually, like that if someone else perform a change on server data...

Flutter Cubit not updating state

<strong>Cubit State class</strong> <pre><code>class AuthState extends Equatable { const AuthState({ this.makePwdVisible = true, }); final bool makePwdV...

Flutter scrambling and translating the list

I have a list and I want to mix these list elements randomly and put them in one of the two Text widgets, and the other one is translated using the translator package....

BlocProvider.of() called with a context that does not contain a Cubit of type CounterBloc

The following is a example code from : <a href="https://bloclibrary.dev/#/flutterbloccoreconcepts" rel="nofollow noreferrer">https://bloclibrary.dev/#/flutterbl...

Flutter - How set double value to Bloc?

In my application there is a field for input of a certain value in double format, but this is not working. What am I doing wrong? My Bloc <pre><c...

Display loading indicator using states from bloc and show dialog if error occurred

I am new to Flutter development and i am build an application where i am usign the Bloc library with states and events. I have a page where the user can entre his emai...

Flutter listen Bloc state from Other Bloc

Hello I'm trying to listen state of bloc form other bloc. I'm using this package <a href="https://pub.dev/packages/bloc" rel="noreferrer">https://pub.dev/packages/bloc...

How to dispatch Bloc events outside of Widget?

I'm new to Bloc architecture and I watched some tutorials lately. I have page which is StatelessWidget and inside I'm using BlocProvider to initialize Bloc inside my U...

Using stream inside stream in firestore using bloc

I have multiple lists from firestore that I get using a stream method and bloc with a subscription, this is working fine. The problem is when I want to add products in...