All Questions
1,031 questions
-1
votes
0
answers
57
views
Flutter Bloc issue, Event won't get fired on initState()
I have a button in page 1 with onpressed that does
Navigator.push(context, customroutebuilerforanimation(page2()));
In page2 I have :
class Page2 extends StatefulWidget {
const Page2({super.key});
...
1
vote
0
answers
62
views
[SOLVED]Flutter bloc doesnt listen to state change
[SOLVED: i was using BlocProvider(); instead of BlocProvider.value(); so i created multiple instances of bloc]
I am changing the state in my profile bloc in response to a onTap. Then i want my ...
1
vote
1
answer
26
views
mocking events in flutter_bloc, to isolate event testing from calling other events
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 ...
1
vote
1
answer
35
views
Executing Bloc Events Synchronously Across Different Blocs
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(...
0
votes
1
answer
47
views
Screen not reacting to Bloc event after navigating
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 ...
0
votes
1
answer
35
views
Using HydratedBloc -- LateInitilizationError Field '__storage@30190796' has not been initialized
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, ...
0
votes
1
answer
77
views
HydratedBloc expects a type HydratedStorageDirectory but getApplicationDocumentsDirectory returns a type of Directory
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 ...
1
vote
0
answers
53
views
Problem with the state of the category selection buttons
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 ...
1
vote
0
answers
19
views
Unable to trigger listeners in bloc event integration test
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 ...
2
votes
0
answers
51
views
Why doesn't the Autocomplete widget update the suggestions when rebuilt?
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 ...
1
vote
1
answer
45
views
Flutter blocs with API requests
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 ...
1
vote
1
answer
45
views
Vscode shows explorer files red after running build runner
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 ...
1
vote
0
answers
37
views
Optimization of videos from Flutter App Api Call
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 ...
1
vote
1
answer
51
views
Flutter bloc event is not getting called on initial screen load
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()...
1
vote
1
answer
125
views
flutter Bloc + Freezed is not emitting the same state twice. UI is not rebuilding
I'm trying to update state after creating an Object.
I've created ObjectsState using freezed package, so there is no sence to use Equatable, because it is already add by package.
class ObjectsState ...