flutter-bloc Questions
4
i have a screen with three widget [widgetA, widgetB, widgetC]
and i have a bloc[BlocA] which is responsible for the data fetching and displaying on this screen
i have three event [eventA, eventB, e...
Edgaredgard asked 11/2, 2022 at 8:6
18
I'm using flutter_bloc.
I've got code like this:
class Settings extends StatelessWidget {
final _formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return ne...
Marileemarilin asked 5/2, 2020 at 13:29
5
So, I have made a function in Cubit Class it is to get data from API. For now I just can get the data if I pressed a button. I wanna make the function automatically called when the page/screen is o...
Scofield asked 3/11, 2021 at 1:43
5
I am developing a mobile application using Flutter. I am using the flutter bloc package, https://pub.dev/packages/flutter_bloc for managing and setting up the bloc. But when the state change it is ...
Hartsfield asked 21/4, 2020 at 4:20
4
Implementing navigation based on auth changes using flutter_bloc and go_router.
What i need to do is at start if User is authenticated it should be redirected to HomeScreen with the ability to navi...
Cycloid asked 13/5, 2023 at 2:5
5
why am i getting the error? I couldn't find the reason. I'll be happy if you can help me.
error screen
You can check my issue on github
Dubious asked 11/4, 2022 at 12:25
7
Solved
i am using flutter_bloc, and i am wondering which method should i use and what is the difference between these two ways?: i read that the first one with (value) the bloc will not automatically clos...
Bekah asked 22/10, 2020 at 10:39
2
I'm working on a reorderable list, and I'm having an issue when the list is reordered.
As you can see in the video, once the list is reordered, the items flicker. However, this only happens if I us...
Amethist asked 30/5, 2023 at 10:25
9
I have built an app where I use flutter_bloc. i want to use go_router for navigation.but for dynamic routing how can i use GoRouter refreshListener parameter with flutter_bloc
GoRouter(
routes: [
...
Cripps asked 12/12, 2021 at 10:26
4
Solved
I am getting this issue while trying to run my code on DartPad.
'runZoned' is deprecated and shouldn't be used. This will be removed in v9.0.0. Use Bloc.Bloc.transformer instead...
What is the cor...
Bute asked 12/9, 2022 at 7:37
2
Solved
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 setState method to render the U...
Pave asked 25/5, 2021 at 7:36
3
I have wrapped the MaterialApp with a BlocProvider / BlocListener
I get an error
"Unhandled Exception: 'package:go_router/src/router.dart': Failed assertion: line 280 pos 12: 'inherited != nul...
Pridgen asked 5/11, 2022 at 11:8
2
Somewhere in a widget using BlocConsumer. Adding hints that we are uploading a file to a REST API.
var file = File(pickedFileList[0].path);
var fileAsBinary = await file.openRead().toList();
var da...
Shows asked 8/10, 2023 at 10:28
2
Solved
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 and pop to return to ...
Bookmark asked 10/10, 2022 at 14:43
2
Solved
I wanted to nest the text Update BlocBuilder inside another BlocBuilder that controls its font size through a slider widget. But, I can't get it to work. Please help!
BlocBuilder<SettingsBloc, ...
Edomite asked 29/3, 2020 at 4:40
5
Solved
Hello I'm trying to listen state of bloc from other bloc.
I'm using this package https://pub.dev/packages/bloc
From my UserBloc I want listen AuthBloc and when It has the state AuthenticationAuthen...
Lesh asked 2/12, 2019 at 10:39
6
I was using go_router in a project. I had a separate file with an instance of GoRouter with all the routes (home, login, register). Then, I added authentication with a cubit. So I had to modify my ...
Mennonite asked 14/6, 2022 at 19:22
3
Solved
My goal is to create an app where the user can choose his preferred theme.
I'm saving the user's choice with shared preferences so I can load it the next app start.
The user can either select:
- Da...
Jacklighter asked 23/2, 2020 at 17:9
3
Solved
I'm using Bloc library and noticed after yielding a new state my TextFormField initialValue does not change.
My app is more complicated than this but I did a minimal example. Also tracking the stat...
Dorri asked 11/8, 2020 at 23:41
1
I'm working on an application that uses cubits to manage the state.
Very often when I need to make an API request I need to get my current localization (handle possible exceptions) and then send it...
Colugo asked 23/6, 2022 at 22:30
0
I'm using go_router for navigation and flutter_bloc for my state management.
I would like to use refreshListenable and listen to my AuthBloC events in my GoRouter configuration, however, I don't ha...
Forficate asked 17/2, 2023 at 8:0
1
Solved
It's my first time using the BLoC pattern in Flutter. I have ran into a problem with providers and context. Here is my main.dart file.
import 'package:flutter/material.dart';
import 'package:flutte...
Amaleta asked 29/12, 2022 at 15:20
2
On Flutter I would like to pass a local bloc to another screen.
This is how I used to pass a bloc to a new route when using the default navigator.
Navigator.of(context).push(
MaterialPageRoute<...
Gwynethgwynne asked 5/10, 2022 at 7:6
2
I am using flutter_bloc and leveraging the MultiBlocProvider widget. Things were working fine, and then at some point, my MultiBlocProvider just refused to instantiate any new Blocs I created and a...
Duple asked 17/6, 2020 at 4:2
3
Solved
example_states:
abstract class ExampleState extends Equatable {
const ExampleState();
}
class LoadingState extends ExampleState {
//
}
class LoadedState extends ExampleState {
//
}
class Fail...
Metic asked 29/6, 2020 at 23:24
1 Next >
© 2022 - 2025 — McMap. All rights reserved.