Skip to main content
Filter by
Sorted by
Tagged with
Best practices
1 vote
2 replies
52 views

This is the first time I'm using bloc so it's a bit confusing for me. I have a workout model, and a repository with methods to fetch all workouts, add new, update, or delete a workout. Initially I ...
Anas Ansari's user avatar
Best practices
4 votes
5 replies
173 views

As per MVVM architecture, I have to use a view model to separate data layer from UI. Can I instead use a Bloc for this purpose? What are the criteria to use one versus the other? Could you please ...
Alex20280's user avatar
  • 385
2 votes
1 answer
80 views

I am working on a Flutter application where I use Bloc as state management. I decided to try and implement Dependency Injection using the Injectable package and managed to implemented it on the ...
Atanas Nankinski's user avatar
0 votes
1 answer
124 views

It's a cloned project. It's working fine in one PC, but facing issue in another. Used Bloc for state management. It's giving the error: The method 'read' isn't defined for the type 'BuildContext'. ...
Indrajeet Raj's user avatar
1 vote
0 answers
83 views

Imagine I'm writing library management software. The library contains thousands of books, and each book can undergo multiple state changes (getting checked out, checked back in, reshelved, etc.) I've ...
Chris B.'s user avatar
  • 91.3k
0 votes
1 answer
81 views

I am building a flutter web application and I'm using Bloc. I've created an 'authOrApp' route to check if the user is authenticated, but when I first run the web app it quickly loads the home screen ...
pedro.curti's user avatar
0 votes
0 answers
43 views

I would like to chain two BLoCs. My app supports multiple accounts. Therefore, I have a global BLoC that contains the currently selected account (GlobalAppCubit with GlobalAppState). Then I have ...
MisterK's user avatar
0 votes
0 answers
101 views

I am building my route navigation system using go_router. I git a point where I need to load a chat's messages and members to be used in the chat room and sub-routes. Some initial data, like chat ...
OKKO's user avatar
  • 609
0 votes
1 answer
139 views

Description: I'm using the infinite_scroll_pagination: ^5.1.0 package in combination with BLoC to implement infinite scrolling in my Flutter app. However, I’m encountering unexpected behavior related ...
Jay Parmar's user avatar
1 vote
1 answer
109 views

iam using cubit for state managment and hive for local DB the app is ecommerce the problem type 'String' is not a subtype of type 'int' in type cast occures when user enter the store page when the ...
Abdlrhman Bashir's user avatar
0 votes
0 answers
40 views

I'm building a Flutter app where multiple pages rely on today's date to work correctly. Each of these pages uses its own Cubit, but I didn’t want to repeat the logic for checking if a new day has ...
leavul's user avatar
  • 33
1 vote
1 answer
88 views

I am using bloc and socket.io in my flutter application to react to login states from the server. Future<void> _setLoginListener(SetLoginListener event, Emitter<LoginState> emit)async{ ...
user29365632's user avatar
0 votes
1 answer
52 views

I am trying to navigate to QuestCartScreen after tapping on discover more quests button.I am using bloc for state management. But it is taking long time to navigate. The action occurs from homepage ...
Vinaya Augusthy's user avatar
2 votes
2 answers
98 views

As the title implies emit isn't working properly so I created a basic app counter but a bit detailed so when the user click the increment button it supposed to trigger the state to be updated with the ...
Abdlrhman Bashir's user avatar
9 votes
2 answers
3k views

I got an error in using flutter bloc and freezed page using for state management I couldn't find solution "Missing concrete implementation of 'getter _$CounterState.count'. Try implementing the ...
Abhijith Justin's user avatar
1 vote
1 answer
99 views

I have this code for Authentication screen using GetX, I want to start using Bloc/Cubit, but I faced an issue about how to handle everything. For example, in this page I have some fields that changes, ...
Osama Assaf's user avatar
0 votes
1 answer
60 views

State calling multiple times. When I am clicking anyone google or facebook for login then my state gets called two times. I am not understanding what is issue. I have 2 pages 1. intro.dart and 2. ...
Deepak's user avatar
  • 2,364
0 votes
1 answer
91 views

I have question considering state management using Flutter bloc mainly cubit. For example in my app I have todos states are @immutable sealed class TodosState {} final class TodoInitial extends ...
Michael Bervo's user avatar
2 votes
0 answers
58 views

I'm using Flutter with BLoC to update user data. The problem is that after calling the update event, the UI doesn't reflect the updated data immediately. Instead, it shows the previous value on the ...
yusuf's user avatar
  • 43
1 vote
1 answer
170 views

I am trying to make a ListView of Widgets, each with it's own Cubit, when that widget is pressed the user should be redirected to a second screen where the informations from the Cubit of the pressed ...
totoskiller's user avatar
0 votes
1 answer
65 views

main.dart: import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_template/bloc/...
Dumindu Jayasekara's user avatar
0 votes
0 answers
44 views

Here is my code. Although I use BLoC for state management (the same applies to GetX), when I press the button (Change ThemeMode), I find that the console prints multiple times: flutter: >>>&...
maaoi's user avatar
  • 1
0 votes
0 answers
77 views

I am changing the state in my profile bloc in response to a onTap. Then i want my bloclistener to listen to the state change and use my navigation to go to a new screen. I've already done this in ...
Emil Lundkvist's user avatar
2 votes
1 answer
135 views

I have been working on an a Flutter app using Flutter_bloc, testing it multiple times per day no problem, tonight and after performing 'flutter pub upgrade' I got this errors; no matter what I do, the ...
seza 's user avatar
  • 23
0 votes
1 answer
93 views

I'm working with Flutter Bloc for state management. I have a ThemeBloc that toggles between light and dark modes, and I want to trigger AppBloc to perform an action whenever the theme changes. However,...
yusuf's user avatar
  • 43
1 vote
1 answer
54 views

I have a bloc event, and I'm writing test for it, my event have one case that will add another event, that I don't want to include in test because I'm focusing on one event, so I have tried multiple ...
makri aymen abderraouf's user avatar
1 vote
1 answer
130 views

I'm working with Flutter Bloc and noticed that when I dispatch the same event multiple times in quick succession, Bloc emits multiple Loading states before transitioning to Success. This behavior ...
TONI IVANOV's user avatar
0 votes
2 answers
73 views

I have a widget/screen that shows some content. At the bottom of the page is a "Refresh" button. What is the best way to show a "Refreshing" overlay on tap of the button without ...
gvaish's user avatar
  • 9,414
0 votes
1 answer
73 views

Maybe anyone knows why the Bloc plugin in the Android Studio generates the empty files when you are creating the new templates? I tried to invalidate caches, restart IDE, reinstall the bloc plugin. ...
KiriLL Sabko's user avatar
0 votes
1 answer
90 views

in main.dart void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: ...
Dat Minh's user avatar
-1 votes
1 answer
82 views

i follow the migration guide https://bloclibrary.dev/migration/ but i get this error DartError: LateInitializationError: Field '__storage' has not been initialized. dart-sdk/lib/_internal/...
Alin1233's user avatar
2 votes
1 answer
135 views

I'm trying to combine Material Autocomplete widget with Bloc pattern for Google Place Autocomplete function. My code as below: BlocBuilder<MyBloc, MyState>( builder: (context, state) { ...
Trung's user avatar
  • 21
1 vote
1 answer
81 views

I'm relatively new to Flutter and Bloc and am confused on how to use the MultiBlocProvider correctly. I have a list page and a create page, to create an item for the list. I've tried: putting the ...
intrepidSequences839's user avatar
1 vote
1 answer
64 views

I need to execute multiple events from different Blocs synchronously, ensuring that each event completes before the next one starts. Here's the current code: context.read<PaymentBloc>().add(...
justinprabhakaran's user avatar
0 votes
1 answer
59 views

So I currently have 2 screens, one screen has a button and when the user presses the button, second screen gets displayed. Nothing too complicated... The second screen should react to what the Bloc ...
Tloz's user avatar
  • 359
0 votes
1 answer
88 views

I am trying to learn Flutter and Bloc/ HydratedBloc. I can't seem to get past an exception I keep getting when trying to save a value to local storage. I have tried creating this new simpler project, ...
Alex's user avatar
  • 13
0 votes
1 answer
243 views

I am new to Flutter and currently trying to learn Bloc and HydratedBloc. I am trying to initialize the storage using getApplicationDocumentDirectory() and use it for the storageDirectory parameter in ...
Alex's user avatar
  • 13
1 vote
0 answers
86 views

I have containers with various specialties. They are taken from the API. I have a problem with updating the state of the buttons. I will give an example in the video of how it should work and how it ...
Назар Марцинко's user avatar
0 votes
0 answers
147 views

I've been trying to implement navigation from login page to home page based on authentication status from firebase. Untill now Ive had this simply done with bloc listener (therefore I know the whole ...
Wiktoor's user avatar
  • 176
1 vote
0 answers
21 views

I'm doing an integration test, where I want to trigger an event change after a submit button. below is my setup for the test as well as the actual test, I've tried multiple ways and positions to set ...
user901790's user avatar
0 votes
1 answer
55 views

I’m using flutter_bloc in a Flutter application to manage the state of a GoogleMap. The BlocListener is responsible for reacting to state changes emitted by a Cubit, such as new student locations or ...
Cristian David Rosero Suarez's user avatar
0 votes
1 answer
50 views

I have a screen where there are 2 dropdown widgets. When I select first dropdown and want to show a loading widget then I am getting error. My problems are: When I select territory then app is ...
Delowar Hossain's user avatar
0 votes
1 answer
117 views

I'm facing an issue with accessing my CubitSubject provider in a specific screen. I have a MultiBlocProvider in the root of my app, and I'm trying to access the CubitSubject in the SubjectsView screen....
TAHA HORANE's user avatar
3 votes
1 answer
128 views

I am building a Flutter Flame game and am trying to have a single action add events to two different blocs. For example, when the character picks up an item I want it to go into an InventoryBloc and ...
Zino's user avatar
  • 109
1 vote
0 answers
28 views

I am working on a Flutter app using the Bloc pattern for state management, and I’m encountering an issue where multiple routes are being pushed onto the navigation stack despite having a single ...
sunny 4k4's user avatar
2 votes
0 answers
73 views

I'm trying to build a search bar where the user can look up for a place, and select a suggestion corresponding on what caracters they wrote. I'm using BLOC, and an API to fetch the suggestions from ...
Eli's user avatar
  • 21
1 vote
1 answer
58 views

I am getting response data from an api while passing in a response body. I have built my state, event, repository of my request but upon calling the user details event in my home page where I want to ...
Anne Nduati's user avatar
1 vote
1 answer
88 views

I'm using the build runner package in my Flutter project. But whenever I ran the following command dart run build_runner build Some of the bloc state files turn red in the vscode file explorer. I ...
anonymous-dev's user avatar
1 vote
0 answers
47 views

I list videos from api on my page in Flutter.I used the PreloadPageView 'preload_page_view' package to list the videos.The videos are in mp4 format. Video sizes average between 100-200 mb. I make the ...
vkc's user avatar
  • 40
1 vote
1 answer
94 views

I just started with flutter bloc and I want to call an event on screen initial load. I have the following code but the event AuthEventCheck is not getting called. void main() { runApp(const MainApp()...
Joyal's user avatar
  • 2,691

1
2 3 4 5
45