Questions tagged [flutter-streambuilder]
192 questions
0
votes
2 answers
Flutter error : Failure to access data inside a snapshot fetched from Firebase Firestore
Using Flutter 3.3.9, I fetch a record from my Firestore database using a Streambuilder. I use the following code segment to do this:
StreamBuilder

Halim Gurgenci
- 135
- 1
- 1
- 5
0
votes
2 answers
convert this into streambuilder in flutter
I want to convert this function into Streambuilder, but somehow I could not figure out how I could do it. Any help would be greatly appreciated.
Future getReceiverChats() async {
var data = await FirebaseFirestore.instance
…

Hashan Ranasinghe
- 33
- 1
- 6
0
votes
2 answers
FlutterSoundRecorder.onProgress never hasData in StreamBuilder
I am following this 5 minutes video to set up an audio recorder in Flutter.
When I click the ElevatedButton to start recording the audio, it does change between play and stop, and an audio file is created, but the snapshot.hasData is always false,…

moon
- 531
- 1
- 5
- 24
0
votes
0 answers
Flutter how do you return value or error from stream
I want to use this method, but instead of returning Future, I want to return a value from it. This value is either a final list of bytes or an error (if error happens anytime).
I don't know how to that, since you can't return a value from…

May
- 93
- 7
0
votes
0 answers
How to implement streamBuilder in multiples pages to have an updated data in all pages using a single stream?
I made a program to show what problem I'm facing with streamBuilders distributed in several pages connected in one single stream. Git here: https://github.com/EuHigorBarbosa/stream_builder_test.git
The mini program was build with 3 pages: A -> B ->…
0
votes
0 answers
Flutter replace static List with Firebase Query
can anybody show me how to replace the static list (_dataFromQuerySnapShot) with Firestore Firebase QuerySnapshot? Thank you!
`
import 'dart:async';
import 'package:flutter/material.dart';
class SearchWidget extends StatelessWidget {
const…

Tobicic
- 1
- 1
0
votes
1 answer
how to filter streambuilder with multiple firestore field instead of one field
I have successfully filter the search results based on one field from the firestore database, what i'm trying to do now is to filter based on several fields from the firebase instead of one.
The code i presented is the entire Streambuilder with one…

Lim
- 31
- 6
0
votes
1 answer
How to reduce/optimize api call when initial a bloc
I have a navbar, change between 2 screens nested with Provider create blocs. Whenever bloc constructor called. It's call api to get data and add to the stream. So the problem here, user can spam switch between 2 screens and make the bloc dispose and…

blackmouse572
- 19
- 5
0
votes
0 answers
How to get id with content of StreamBuilder> when creating a List with snapshot
I'm using geoflutterfire() to get some datas. It works fine but for a part of my app, I would like to send only a List to another screen without calling again firebase.
I do :
`
GeoFirePoint maposition =
geofire.point(latitude: latitude,…

xuairros
- 53
- 5
0
votes
0 answers
Broadcast stream in Flutter only responds to one of multiple listeners
I receive data from a BLE unit and have a broadcast stream exposed by a singleton locator (Get_It) to my application.
From the data, I want to build several small display widgets that need to display different information based on the same data…

JadedEric
- 1,943
- 2
- 26
- 49
0
votes
0 answers
Move StreamBuilder List item to the top if ExpansionTile is open
I am working with the plugin FLutter Blue, and I have a StreamBuilder with a list of devices found after the scan process. Every element of the list can be expanded (ExpansionTile).
I noticed that the scanning, even if I remove the timeout parameter…

TheOldBlackbeard
- 395
- 4
- 22
0
votes
1 answer
creating a class from a stream
I have a button to apply for a job.
If I press the button and I dont already have applied to the job, the code should create a new job application, then open the page to see that application. [ this is working perfect ]
If I press the button and I…

Juan Casas
- 268
- 2
- 13
0
votes
1 answer
unable to use class reference when fetching data from firebase
I am trying to clean up my code by referencing a class that contains all my cloud functions, however, I am running into a mini bug that is driving me nuts.
Here is the class that holds my cloud logic::
class FirebaseCloudStorage {
final job =…

Juan Casas
- 268
- 2
- 13
0
votes
0 answers
Orderby not working when displaying records from firebase
I am trying to display a list according to when it was created.
for some weird reason, the list is getting confused or something, because its displaying messages out of order.
the chat appears to be sorting alphabetically sometimes, not sure…

Juan Casas
- 268
- 2
- 13
0
votes
1 answer
The method 'data' was called on null. Receiver: null Tried calling: data() in flutter firebase chat app
The following NoSuchMethodError was thrown building FutureBuilder>>(dirty, state: _FutureBuilderState>>#c2b0e):
The method 'data' was called on null.
Receiver: null
Tried…