bloc Questions

3

Solved

//File: email_sign_in_model.dart class EmailSignInModel { EmailSignInModel({ this.email='', this.formType=EmailSignInFormType.signIn, this.isLoading=false, this.password='', this.submitted=f...
Flanch asked 14/6, 2020 at 12:33

7

When using the class Bloc provider as follows, I get the error: 'The method 'ancestorInheritedElementForWidgetOfExactType' isn't defined for the type 'BuildContext'.' So I replaced this line contex...
Jassy asked 10/1, 2021 at 19:44

2

Solved

I am a beginner in Dart language development. I try to create a sample flutter application BLOC pattern inspired by this GitHub repo, but I got some error message related to the class inheritance. ...
Taxiplane asked 22/11, 2020 at 12:46

1

Solved

I am using flutter_bloc package. Is it a bad practice if I have a bloc whose state is a list of widgets? I use this bloc to push (add) and pop (remove) widgets/mini-screens from a list. I use this ...
Codi asked 25/5, 2022 at 17:56

2

Solved

In summary I want the "context.read().add(EnabledEvent())" to work from the controller itself or some other alternative I can use to trigger an event from the controller and update the st...
Cate asked 27/4, 2022 at 12:51

3

In the code shown below , the dispatch event is called from within the build method after getting the BuildContext object. What if I wish to do is to dispatch an event during processing at the star...
Tremolo asked 7/9, 2019 at 15:6

1

Solved

I have a bloc hierarchy, where in the child bloc's mapEvenToState I used super.mapEventToState. In the newer version of the bloc package, mapEventToState is deprecated. What should I use instead of...
Ungenerous asked 4/4, 2022 at 18:17

1

I'm building a login page, and I have created what I intend to be used as a fully dynamic TextField widget. I now need to create 2 instances of that widget (email and password inputs) and send para...
Adieu asked 18/1, 2022 at 17:19

2

Solved

In my flutter app, I use flutter_bloc for state management. The bloc in question uses a repository. The repository subscribes to a websocket, and new data is added to a stream. Problem: My bloc lis...
Harrelson asked 6/12, 2021 at 10:12

2

UPDATE After finding the onChange override method it appears that the updated state is not being emitted #confused UPDATE 2 Further debugging revealed that the StreamController appears to be closed...
Counterpressure asked 15/10, 2020 at 11:51

2

Solved

I'm building a phone authentication ui (OTP) using firebase_auth library with BLoC pattern (a bit of an overkill for this ui, but the whole project is in BLoC, so). I'm processing the authenticatio...
Estus asked 18/10, 2020 at 7:54

2

Solved

I get the following error when I run code similar to the below code: BlocProvider.of() called with a context that does not contain a Bloc. To replicate BlocProvider( create: (context) => getIt&...
Pantia asked 29/6, 2020 at 12:5

1

Solved

// Copyright (c) 2021, Very Good Ventures // https://verygood.ventures // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file or at // https://op...
Badtempered asked 11/11, 2021 at 19:44

2

Solved

I have this code for listening to bloc on my screen. late MyBloc myBloc; @override void initState() { print('inside init state'); super.initState(); myBloc = BlocProvider.of<MyBloc>(cont...
Morn asked 3/2, 2022 at 16:11

7

I'm trying to run flutter test using the terminal and i receive the following error. the following file C:/Users/User/AppData/Local/Temp/flutter_test_listener.e6fa92b4-6cd1-11e9-b9cb-68f728ca4610/l...
Monteiro asked 2/5, 2019 at 12:12

2

Solved

I am following the migration to the new bloc 8.0.0. I am trying to remove the mapEventToState but I am having a difficulty in doing so. Can you help me how to do it. I have tried it below but it wo...
Bludgeon asked 1/1, 2022 at 14:15

2

Solved

does anyone have any idea of how I can do this? My code: @override void dispose() { final FiltersBloc filtersBloc = BlocProvider.of<FiltersBloc>(context); super.dispose(); } error...
Modillion asked 19/10, 2019 at 14:30

1

Solved

Ive created an app with Flutter bloc package.Ive created a screen named learning_dashboard_screen which contains a list fetched from a server. inside that same screen I have a filter button which o...
Devilish asked 16/12, 2021 at 8:7

2

Solved

I created simple app to test bloc 7.2.0 and faced that BlocBuilder doesn't rebuild after first successful rebuild. On every other trigger bloc emits new state, but BlocBuilder ignores it. Please no...
Donall asked 19/10, 2021 at 12:24

1

Solved

suppose that we navigate to "PageA" using the following code: Navigator.push( context, MaterialPageRoute( builder: (context) { return BlocProvider( create: (context) => BlocA(), ...
Marchant asked 4/10, 2021 at 8:44

2

Solved

I've been building a login/authentication feature using a combination of this login tutorial and the resocoder clean architecture tutorials. It's 99% working perfectly, but it is not responding pro...
Scald asked 17/5, 2020 at 12:9

1

I'm writing my first Flutter app and struggling with the variety of state management solutions. I decided to start with Provider, but I'm thinking about switching over to BLoC. So far most of the e...
Dowden asked 22/9, 2021 at 3:42

1

Need to know whether I can get last value from Stream without using third party library. The first​ way I tried, when I can sending the value to stream in 'changeEmail', I can store the newValue i...
Arak asked 22/1, 2019 at 13:59

2

I'm using flutter_bloc for state management and landed on this issue. When updating a field and saving it, the BlocBuilder is not refreshing the page. It is working fine when Adding or Deleting. I'...
Slap asked 3/4, 2019 at 20:32

2

I am trying to use the BLoC library with the connectivity_plus plugin in Flutter. I have followed this post and this post to set up an Internet Cubit for the project. The code works fine when the a...
Wanonah asked 3/8, 2021 at 11:59

© 2022 - 2024 — McMap. All rights reserved.