Issue I can’t get the length of the list in the widget although I wrote everything correct this is my cubit class AppCubit extends Cubit<NewsStates> { AppCubit() : super(NewsInit()); static AppCubit get(context) => BlocProvider.of(context); MianTeams? mianTeams; void getTimes() { emit(NewsLoding());
Continue readingTag: cubit
Flutter: State in BLoC changes its value before calling emit ()
Issue My problem is that when I’m calling a Cubit function it changes a value before I hit emit. because of that, the Cubit cannot dedicate that there wase a change in the state and the emit () won’t work.
Continue readingCan Bloc be used in StatefullWidget to use SingleTickerProviderStateMixin? (I'm kinda new)
Issue I’m using a TabBarController and as u know we should extend SingleTickerProviderStateMixin which is available only for StatefullWidget.. I’m using Bloc in my app so I can optimize the performance. Solution Absolutely, you can accomplish this using Bloc State
Continue readingCubit state change problem in flutter cubit
Issue So I am trying cubit state management and through that I am trying to login a user to second screen. The error occurs in cubit states changing as it’s stuck on initial State. Upon pressing the login button the
Continue readingFlutter bloc Cubit Bad state: Cannot emit new states after calling close
Issue 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 second page
Continue readingBloc and Cubit in the same project
Issue can I use cubit and bloc together in the same project? The reason for doing this is that there are some simple screens that do not have to use bloc. Solution Cubit is a subset of the BLoC Pattern
Continue readingHow can I use multiple cubits and emit states from both in the same screen?
Issue I need to rebuild the body of the home screen when I add new task to get all the tasks including the last task added, I tried many solutions from many resources but I didn’t find an solution. here
Continue readingBad state: Cannot emit new states after calling close
Issue I have a problem in Test section of flutter, I wrote a test for simple counter app which uses cubit, but while I run all test it gives me the error mentioned in header, any body knows why? it
Continue readingBlocBuilder vs BlocListener
Issue I have a very specific question when reading the documentation. After reading the BlocBuilder documentation, I then went on by reading about the BlocListener. Everything was pretty clear, until I read this: The listener is guaranteed to only be
Continue readingSending data to other page with bloc cubit
Issue My problem is this. I created cubit for 2 different pages. When I am on the first page, I can fill the list inside the 2nd page and I can read it from the log. However, when I go
Continue reading