Questions tagged [flutter-streambuilder]
192 questions
1
vote
0 answers
StreamBuilder with KeepAlive performance issues ? flutter
I have a question what is if you have the same Stream in multiple Pages (StreamBuilder in every Page) with AutomaticKeepStateAliveClientMixin. Does this lead to performance issues for example if 6 Pages are open with lists with 150 items and the…

L. K
- 11
- 2
1
vote
3 answers
The non-nullable local variable 'iconData' must be assigned before it can be used in flutter?
I'm trying to add the switch case statement in IconData and Icon Color when i use they throw some errors
The non-nullable local variable 'iconData' must be assigned before it can be used.
Try giving it an initializer expression, or ensure that…
user10993979
1
vote
1 answer
Flutter Error: Instance member 'user' can't be accessed using static access
I/m facing this issue. Can anyone assist?
Thanks
First page
Second page. Both pages are shown below

Dark_programmer
- 19
- 1
- 4
1
vote
2 answers
Problem reading last entry in Firestore - Class '_JsonQuerySnapshot' has no instance method '[]'
I am trying to read last entry from Firebase Friestore like this:
This is my stream:
final getLastEmotion = _emotionsDbReference
.orderBy('timeStamp', descending: true)
.limit(1)
.snapshots();
and this is my stream…

AturicLiqr
- 49
- 7
1
vote
2 answers
Changing AudioHandler.mediaItem without a Queue
I am working on my first Flutter app which implements basic stream functionality. Upon starting, the app loads a stream from source A. The app contains navigation menus to allow the user to play streams from additional sources B, C, D... etc. I've…

John Harrington
- 1,314
- 12
- 36
1
vote
2 answers
Flutter Firestore - Null Safety Error When Fetching URL stored as String
Running into a what appears to be a Null Safety issue when returning a specific key-value pair from Firestore. Specifically, the error is being triggered when trying to read data['thumbnail'] from Firestore. data['thumbnail'] is a URL for an Image,…

thebenCA
- 149
- 13
1
vote
1 answer
Expected Value of Map,But got one type of '_JsonDocumentSnapshot'
I am having this issue of _JsonDocumentSnapshot While using streambuilder i don't know why i am running into this issue i saw other do the same thing and they did not run into this issue.
My firestore data base structure=>…

shriyash jagtap
- 23
- 1
- 4
1
vote
1 answer
Futurebuilder is not updating data from firestore
So i am having issue with futurebuilder i want my app to update when a bool is set true but it wasn't working at all so i added a line to to see if the value of bool is changing or not and released it's not changing.
import…

shriyash jagtap
- 23
- 1
- 4
1
vote
0 answers
How to get progress status for a video file upload in flutter
I need the video upload stream to show the upload progress status.
I have tried using Dio but here the video file size is getting increased also not playing after uploading.
await Dio().put(
uploadURL,
data: await…

Subhendu
- 11
- 2
1
vote
1 answer
Flutter streamsocket
I had a problem to read a data from a stream socket.
After receiveing data in a websocket call, I want put all my content in a variable and start to using that wariable. Instead, I can print only the last string line in the body of the app. To…

Alessandro Buscema
- 51
- 1
- 5
1
vote
1 answer
How to create a singleton Stream that can be listened by a Widget which is used in Multiple areas
Here I'm using GetIt. I created a class contains stream and also mark this class as singleton, I created a widget that uses this stream. Problem is whenever I used this in multiple location it causes Bad state: Stream has already been listened…

arunized
- 38
- 5
1
vote
2 answers
The operator '[]' isn't defined for the class 'Object'. flutter
I'm trying to get data from the firebase database. I'm getting this error:
The operator '[]' isn't defined for the class 'Object'
Try many methods but the error is still here.
StreamBuilder(
stream:…

Adeel Nazim
- 640
- 6
- 17
1
vote
1 answer
The argument type 'UserModel? Function(User)' can't be assigned to the parameter type 'UserModel Function(User?)'
Error : I am getting below error in Stream while mapping
The argument type 'UserModel? Function(User)' can't be assigned to the parameter type 'UserModel Function(User?)'
The code and the directories
-user.dart
class UserModel {
final String id;
…

Basavaraj c kori
- 21
- 3
1
vote
0 answers
'PublishSubject' is not a subtype of type 'Stream' of 'stream'
I am getting error at line 19 where I applied transform on _item_fetcher and pipe it to _item_output: 'PublishSubject' is not a subtype of type 'Stream' of 'stream'. _repository.fetch_Items() returns a Future, ItemModel is custom made class.…

sharmaji saheb
- 57
- 2
- 7
1
vote
1 answer
What would be a bad use of streams?
Is there anything you should not do in Flutter with streams? Like for example is there any maximum number of streams that you should use or listen to?
Or is it better to use multiple StreamBuilder or just do a setState everytime you update a value?

Jan
- 117
- 2
- 8