Questions tagged [flutter-bloc]

For questions relating to the "flutter_bloc" package for the Flutter framework. Use this tag in combination with the general [flutter] tag. If your question applies to Flutter more generally, use the [flutter] tag only.

This tag should be used for any questions regarding the flutter_bloc package for the Flutter framework.

flutter_bloc is a package implementing the BloC pattern for Flutter, specifically the BlocProvider and BlocBuilder classes.

To get started, you can read through the README document on GitHub.

932 questions
-1
votes
1 answer

i got this Error when trying to consume a cubit

I have create a cubit using bloc provider in the Chapters screen and in another screen I'm trying to consume the same cubit directly without creating another one. this is the Chapters screen import 'package:flutter/material.dart'; import…
-1
votes
1 answer

Can i passing nothing in BlocBuilder with if else statement

I don't want to pass data to text widget if the counterValue number is less than 0. This the code: main.dart : import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import…
-1
votes
1 answer

Save Information Bloc Flutter

This is a what is the best practice kind of a question. I am working on a user login . Used bloc for login events like loginInProgress, UserNameValidation , PasswordValidation and LoginSuccess. Now after login I have huge set of data in terms of…
-1
votes
2 answers

cubit returns a null value

I am facing very weird problem. i am using bloc with freezed, injectable and dartz. i just need to get data from SQl database and display it when a today page opened. The code of UI is: class TodayPage extends HookWidget { const TodayPage(); …
-1
votes
1 answer

Should i use multi bloc provider with multi bloc Listener?

In flutter bloc if i need to use multi bloc listener to make bloc to bloc communitication , should i use multi bloc provider?
-1
votes
1 answer

How to add CircularProgressIndicator using flutter_bloc

I am trying to make that when I submit the button, the isLoading variable is set to true, and when the block issues the state it returns to false, to show a circular progress indicator. My problem is that I don't know WHERE or HOW to put that…
Dubbain
  • 73
  • 1
  • 8
-1
votes
1 answer

Could not find the correct Provider above this BlocConsumer Widget

First of all, I read almost all question related to this error and I couldn't find any answer to question. I'm trying to use BlocProvider to provide a child widget with BlocProvider in SignInPage: class SignInPage extends StatelessWidget { const…
Mahmood Ali
  • 487
  • 1
  • 6
  • 19
-1
votes
1 answer

can I use flutter_bloc to manages state in flutter packages?

I'm traying to create a packages to use it in a flutter application, the packages has some pages where I need to manage state, I want to use flutter_bloc but I don't know if that possible ?
-1
votes
1 answer

flutter- Can I implemment BlocProvider in the app tree instead of implemmented in runApp?

I'm working in application, that do not use bloc as state management, and I want to add more feature, (the feature will use the bloc), when I try to run the App I got this Error: ══╡ EXCEPTION CAUGHT BY WIDGETS…
-1
votes
2 answers

How to pass data from Singleton to Stateful Widget class?

I have a class Communicator which where I've declared a few functions. Executing those function takes some time and an update of progress is required till all the functions get executed. Now, I am using the functions of class Communicator in my…
vibu
  • 77
  • 1
  • 8
-1
votes
1 answer

flutter bloc and how a bloc state change can then trigger a 2nd async call before updating the Widget/UI with both? (code attached)

How would one load a set of local images for display in a widget (noting this is async - see function below) triggered by (based on) a change in state from a flutter_bloc for “settings”? Noting this bloc is persisted too via hydrated_bloc. So the…
Greg
  • 34,042
  • 79
  • 253
  • 454
-1
votes
1 answer

flutter_bloc subwidget closes the bloc of the parent widget

I am using the flutter_bloc package. I have a page with a tabbar. The page creates a bloc and provides it to the widgets, which are used as tab content. class _MyScreenState extends State { MyBloc _myBloc; ... Widget _buildTabBar()…
A.K.
  • 568
  • 5
  • 17
-1
votes
1 answer

How to show notification by using Flutter_bloc

I am new in flutter_bloc package. How to show notification alert by using flutter_bloc package. Here is the example what i did without using bloc. IconButton( icon: Icon(Icons.notifications), …
SOUGAT RIYADH
  • 562
  • 2
  • 10
  • 26
-2
votes
0 answers

Unhandled Exception: DioError [bad response]: The request returned an invalid status code of 500

utilize Dio to create a POST request. Within this request, I transmit two pieces of information: an XFile, which represents an image obtained through an image picker, and a name provided as a String. The structure of my request function is as…
-2
votes
2 answers

The named parameter 'bloc' isn't defined - bloc provider

I've read the flutter-bloc documentation and I really have no idea what to do anymore. Someone to help? error bloc provider
Ilgner
  • 21
  • 2
1 2 3
62
63