Questions tagged [flutter-streambuilder]

192 questions
1
vote
2 answers

How to generate stream in flutter

I am making some experiment with flutter stream. I have a class for generating stream of int. Here is the class : class CounterRepository { int _counter = 123; void increment() { _counter++; } void decrement() { _counter--; } …
Newaj
  • 3,992
  • 4
  • 32
  • 50
1
vote
0 answers

Fetching more data from Realtimedatabase

I am trying to get additional data from Firebase Realtime Database, based on the data returned by the StreamBuilder. Widget build(BuildContext context) { var authBloc = Provider.of(context); return Scaffold( body: SafeArea( bottom:…
Saad Bashir
  • 4,341
  • 8
  • 30
  • 60
1
vote
0 answers

StreamProvider not updating

ı am working on chat page like conversation. And ı can fetch data with stream from firebase.When ı open page first time all data come but if new data added to the firebase, my ui not updating. And also when ı go to back and click again to go to…
ali
  • 31
  • 1
  • 4
1
vote
1 answer

Flutter/Firebase: How to reduce StreamBuilder call on push/pop call?

I have a screen with a bottomNavigationBar: class AttendantMainPage extends StatefulWidget { final String? email; AttendantMainPage({ Key? key, this.email, }) : super(key: key); @override _AttentdantMainPageState createState() =>…
0
votes
1 answer

Using Stream Builder and for loop error in flutter

This is suppose to update scream using a stream builder but i keep getting: The following _TypeError was thrown building StreamBuilder(dirty, state: _StreamBuilderBaseState#e186e): type 'String' is not a subtype of type…
0
votes
0 answers

Convert from FutureBuilder to StreamBuilder? [Flutter]

can anyone convert this function and body to stream builder i want to get countinous updated data instead of one time calling (Streambuilder instead of Futurebuilder) issue: with this future builder is when something is change on the database its…
0
votes
0 answers

Update data from a streambuilder passed by argument in getx

Currently I have 3 screens, a home which has a streambuilder, a widget which receives the information by parameter and when clicked, I send the data to another screen called detail but which are sent by argument using Getx. I would like that when…
0
votes
1 answer

Unable to preserver the state of nested Tab with streambuilder and futurebuilder

Previously my AutomaticKeepAliveClientMixin did work well to preserve the state but with this code below it is not working. Firstly i have a Main tab.. inside the 3rd tab there are 3 tabs (nested Tab if you may) The code below fails to preserve the…
Pannam
  • 482
  • 1
  • 3
  • 16
0
votes
0 answers

How to display data in real time

I have a payment list that I need to import from a subcollection included in a payments collection and display it in real time. I use the stream to get a real-time change in the display of my data obtained from the firebase. Unfortunately, it didn't…
Chatti
  • 1
0
votes
0 answers

How can I listen to the state and display it on the user's screen using stream Flutter?

The user transmits images that are subsequently uploaded to the server. At the same time, while some images are being uploaded, the user should be able to add other images. I assume that this needs to be done using STREAM, but I don't understand…
Maxim
  • 21
  • 4
0
votes
0 answers

StreamController emit only once in Flutter

I have this code in cubit, where I try to get initial value of cart item count and then to subscribe for stream changes. class HomeCubit extends Cubit { late GetCollectionsUseCase _collectionsUseCase; late GetCartItemsCountUseCase…
Zookey
  • 2,637
  • 13
  • 46
  • 80
0
votes
1 answer

Riverpod and JustAudio

I am currently trying to make a music player using flutter. I wanted my now playing screen and miniplayer to all have the same content and be in sync with each other throughout the entire application (the way spotify and deezer do it). I'm still a…
0
votes
0 answers

visualising websocket stream with streambuilder

currently working on an app that gives real time data visualization based on a thingsboard back-end. I'm connecting to thingsboard over Websockets for which I first need to fetch a token from thingsboard. this token let's me then set-up the…
0
votes
1 answer

Flutter StreamSubscription works with listen, but not in a StreamBuilder widget

Sure! Here's the fixed message to ask for help on Stack Overflow: I am working with flutter_blue_plus and flutter_foreground_task packages. I have a Bluetooth handler class called BluetoothTaskHandler, which extends TaskHandler. Here's the…
Lorenzo S
  • 1,397
  • 13
  • 25
0
votes
1 answer

How to call get API with passing header and body without streamed response in flutter

Here is my code. I'm not able to store streamed responses in model, so I want response in any other manner, or I want solution for how to store response in model. List dataList = []; StreamController dataC = StreamController(); var…
Jaini Shah
  • 45
  • 3