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

Dart / flutter widget test, Text Widgets are not found either by key nor by text

I implemented an app using WeatherAPI like in the ResoCoder example. I now want to test if every text widget is showing correct information but I already fail in findi...

Does Cubit only works with Stateless Widgets?

I am trying to apply this state management but i cannot implement it. If I use stateless widget, i can easily implement it but stateful it is complicated and i cannot...

Flutter BLoC library: Where to keep the TextEditingController object: in State, in BLoC / Cubit class or in the widget?

While using BLoC library we store all the variables in a state class. But where to store TextEditingController, which does not change, but the value of it does? <p...

ImagePickerCubit doesnt conform to the bound BlocBase&lt;ImagePickerState&gt; of the type parameter B

I'm getting an error trying to create a BlocBuilder in my app: 'ImagePickerCubit' doesn't conform to the bound 'BlocBase' of the type parameter 'B'. Try using a...

How to ignore state with cubit in flutter?

I'm using cubit to manage state of widgets, and I want to make widget updated only when specific type of state is emitted. <pre class="lang-dart prettyprint-overri...

Flutter bloc Cubit Bad state: Cannot emit new states after calling close

I have an app that I build using Cubit I have two pages A and B.every thing works fine on its own. I use a change status cubit on both pages but when I move to the sec...

Add check internet connection bloc to another screen flutter

I've 100% finished App, The thing is I wanna implement check internet connection on every single screen, I already created a function inside a cubit Internet Cub...

cant use bloc observer after bloc update

I have a problem with the last update of bloc 8.0.1 I can't use the bloc observer and I used the BlocOverrides and still not working and here is my code <a href...

Flutter Bloc does not rebuild the widget after a state change

When I try to change value on that widget (is number picker from pub.dev) <a href="https://i.imgur.com/LEjvcd4.jpg" rel="nofollow noreferrer">WidgetScreen</a>, even th...

Check if a cubit is in the context

is there a way to check if a cubit/bloc is available in the current context. I have a widget which is used in different pages/widgets, an some of the pages are using a...

How to add multiple state in one cubit in flutter bloc pattern?

I was developing an application in flutter which does OTP based authentication to log in. Earlier I was managing the states in the class itself so that I can use the s...

How to emit empty state more than one time when I am using equatable

I am trying to emit a state more than one time because I am validating a form no need to add any thing on the constructor and make copyWith func etc.. so could...

How to use BlocBuilder to refresh a Dialog in Flutter

I have a dialog and I wrap it in a blocbuilder to update it according to the type of state but the dialog just is built First time and after state has changed it doesn...