For questions relating to Flutter's FutureBuilder class. Use this tag in combination with the general [flutter] tag. If your question applies to Flutter more generally, use the [flutter] tag only.
Questions tagged [flutter-futurebuilder]
667 questions
1
vote
1 answer
Dart async await with a future
I have a situation where a map method is not completing before a return statement in a future list.
Here is the code below. The line that prints "####### returnFormFields----" prints first and then the map runs. How can I make sure the map is done…

Mirza Celik
- 33
- 1
- 6
1
vote
2 answers
How to fix Bad state: field does not exist within the DocumentSnapshotPlatform Firebase Flutter FutureBuilder
I'm getting an error in a FutureBuilder while trying to retrieve data from the Firestore database. The error message is:
The following StateError was thrown building
FutureBuilder>(dirty,…

Carleton Y
- 289
- 5
- 17
1
vote
0 answers
How to use FutureBuilder correctly with functions in Flutter
I have a tabbed screen with two tabs. One of the tabs is loaded with a google maps view. On that map I need to place custom markers, which (place id and geo coordinates) I fetch from an API. The relevant API call function is inside a mixin which I…

Pixxu Waku
- 423
- 8
- 21
1
vote
0 answers
FutureBuilder snapshot.hasData always return false
i'm new to learning darts and flutter i'm making code to display data with FutureBuilder, in console window i got the response i want, but the snapshot.hashData code always returns false
Myclass model
class ResponseDataBarang {
int? _kode;
…

M Hasan Nudin
- 21
- 3
1
vote
1 answer
FutureBuilder stuck at loading while trying to load data from sqflite
I'm using sqflite for storing some data. And using a FutureBuilder to display the data after fetching from the database. But the FutureBuilder failing to return data, is always stuck in the loading screen. This is my database code:
import…

Shourya Shikhar
- 1,342
- 1
- 11
- 29
1
vote
1 answer
Weird scrolling behaviour when use ScrollController + FutureBuilder + Provider + ListView.builder
I created a list view based on a Future Provider. It works as expected.
Now I want to add a ScrollController in order to create a animated FloatingActionButton like Gmail "Compose" button.
I put controller attribute on listView.builder.
And here I…

Climberdav
- 61
- 7
1
vote
1 answer
Flutter problem with access to Sqflite data via FutureBuilder. ConnectionState.done, null
Trying to change access to database from:
simply initializing access to data initState and then showing results in ListView.builder
to
ListView.builder inside the FutureBuilder.
However I lost my way in this FutureBuilder and my list is empty. I…

Alex K
- 81
- 9
1
vote
0 answers
How do I get Future to wait for my transactions in Flutter
I have this Future and my code template like this:
Future getDevices() async {
stream.listen();
Timer.periodic(Duration(seconds:5), (timer) {
POST TO SERVER.then((value){
return Future.value(value);
});
});
}
I'm Listening to a Stream to…

Baran Gungor
- 205
- 2
- 11
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
1 answer
How to append data into a Future>
I want to create a on scroll data load. currently I am getting data(ad list) from a api call as a Future
- >
in scroll listener function I just want to append next page data list.
there was a example of doing it with a list, I just want to do…
1
vote
1 answer
flutter: how to parse super complex json file?
i have a super long json file to be parsed but once i fetch it in a FutureBuilder it keeps erroring that i used a null check operator on a null value, to me seems like i don't know the logic..!
here's the simplified json:
{
"city": {
"Name":…

Muhammad Rasul
- 45
- 7
1
vote
2 answers
How to Pull Refresh FutureBuilder> (); page in flutter?
here im try to use FutureBuilder for my list but I can't refresh by on pullRefresh
@override
Widget build(BuildContext context) {
return RefreshIndicator(
onRefresh: _refreshPhotos, // fatch snapshot.data!
child:…

HiPradeep
- 81
- 9
1
vote
2 answers
No MediaQuery widget ancestor found.The relevant error-causing widget was FutureBuilder
No MediaQuery widget ancestor found.
The relevant error-causing widget was
FutureBuilder
Scaffold widgets require a MediaQuery widget anchester.The Specific widget that could not find a Mediaquery anchester was:
Scaffold
import…

Rex
- 250
- 1
- 3
- 18
1
vote
1 answer
Flutter - calling setState() before the build
I use a futureBuilder to display date inside TextFormFields, if there is data in the webservice I call in the futureBuilder for the date I selected in the DateTimePicker, the TextFormField is disabled and the data is displayed in it. Else, the…

JS1
- 631
- 2
- 7
- 23
1
vote
1 answer
Flutter how i can use a setState event without refresh my futurebuilder
I have a question.
At the moment i try to build a category list with data from firebase.
To load the data i use a futurebuilder.
Here my category list:
Now i want to implement a color change event if i click on a list element.
For example, if i…
user16754196