bloc Questions

10

Solved

I have a FloatingActionButton inside a widget tree which has a BlocProvider from flutter_bloc. Something like this: BlocProvider( builder: (context) { SomeBloc someBloc = SomeBloc(); someBloc.d...
Chintzy asked 18/8, 2019 at 19:36

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

3

Solved

So, I'm using the auto_route package for navigation in my app and flutter_bloc for state management. When I was using the old Navigator, I could just wrap a route with a BlocProvider. For example: ...
Knudson asked 14/6, 2021 at 13:26

2

Solved

We have a Flutter application that uses websockets for server initiated communication. We use flutter_bloc as the state management mechanism across the app. UI events are conveyed to the widget thr...
Rothstein asked 22/2, 2020 at 7:36

2

Solved

I am working on a multilingual app in Flutter. I used flutter_localizations package for localization and intl package for internationalization. In the normal way inside Widgets, I can use it with h...
Setaceous asked 11/4, 2022 at 5:51

3

Solved

I'm working with Flutter quite a long time and have a bunch of released products. I never really liked BLoC and preferred to use Provider or later Riverpod. I just don't understand that event conce...
Astronomy asked 1/6, 2021 at 21:39

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

3

Solved

I am looking for the most convenient way to share bloc in different screens/pages without providing at top of the material app. For example I have a Customer bloc, which is required in CustomerList...
Mlle asked 3/8, 2022 at 6:42

3

Solved

Context: I have an App that has a PageView to navigate between five screens using BottomNavigationBar, One page is making use of the Bloc Pattern (almost all of the pages will use Bloc in future re...
Stich asked 8/6, 2020 at 20:28

3

Solved

Hey I've been bloc observer as the main state management tool in my flutter app and using it made things much easier. The bloc observer is the main tool I use to debug and observe things happening....
Goltz asked 22/11, 2021 at 18:14

1

Solved

I see people use onError just for debugging. I thought I could use it to emit new states like emit(ErrorState(message: "An error")). But with the new versions of the bloc package, we shou...
Lois asked 5/6, 2022 at 6:11

2

When we use BlocProvider.of<OrderBloc>(context) to access Bloc object, it returns an exception if no OrderBloc exists on ancestor widgets of current context. Returned exceptions as follows: N...
Retiring asked 30/4, 2021 at 11:2

3

I'm new in Bloc programming pattern and I'm having an issue when using it in with Dropdown That's in my bloc class: final _dropDown = BehaviorSubject<String>(); Stream<String> get drop...
Electromotive asked 19/12, 2018 at 14:11

4

Solved

I am a bit confused about the new release of Bloc: 6.0.0, adding Cubit notion, is the bloc depreciated or we can use both of them?
Fatherhood asked 28/7, 2020 at 9:29

2

My Bloc state isn't updating and I've found the problem to potentially be a Map<String, Map<String, String> property that isnt being compared properly. Please correct me if I'm wrong, but ...
Assiniboine asked 14/7, 2020 at 12:52

2

I'm working on an app using a WeatherAPI. I currently fail to implement some working tests. I tried to follow ResoCoders Guide (https://resocoder.com/2019/11/29/bloc-test-tutorial-easier-way-to-tes...
Handwriting asked 5/5, 2021 at 15:26

1

Solved

Im making a type of chat app, and has a need for multiple blocs/repositories/etc. This has lead to my widget tree looking like this: And also has lead to a nasty looking build method in my main.da...

1

Solved

I have a class where I have to call an event from my bloc chat_bloc. Im not able to call the event, since I don't have any context. When I try to add the ChatBloc to my SocketRepository im totally ...
Straightforward asked 28/7, 2022 at 8:37

2

I am struggling to put the block pattern in my Flutter App. I am using this library to make it a little bit simpler for me: https://felangel.github.io/bloc/#/ I have one main Question. How can I m...
Seafowl asked 4/2, 2019 at 17:30

1

I'm using Freezed to generate sealed data classes in my Flutter app. I need to test it and I don't know how to do so. Any idea? This is the state: @freezed abstract class LoginState with _$LoginSta...
Cello asked 22/11, 2020 at 19:3

1

I have a nested structure, something like this: List<Areas> |-- List<Topics> | |-- List<Exercises> This is the workflow of my app: App is opened Fetch API and display a list of ...
Sade asked 9/11, 2020 at 13:26

1

Solved

I'm new to bloc and trying to implement a chat with flutter_bloc package. The service for my messaging is twilio conversations api. My function works perfectly fine, Im simply not able to refresh m...

2

Solved

When I want to confirm my password, but i can not compare the first and last passwords. Here my password class. It works fine, but confirmPassword section not. class Password extends FormzInput<...
Hairstreak asked 12/10, 2021 at 13:39

© 2022 - 2024 — McMap. All rights reserved.