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
State exists and rebuild widget again and again
I am working on a web app where I need to build a widget depending on a state. Now, I have different Cubits and they have different states. One is main Cubit, that is on the top widget or page. Then I have another cubit state that builds part of…

WasimSafdar
- 1,044
- 3
- 16
- 39
1
vote
2 answers
Using ListView with async items without knowing itemCount beforehand
I want to use Flutter’s ListView to display a list of items, and the data of the items are obtained from a RESTful API with pagination support. E.g.
GET /transactions?page=1&limit=100
{
"transactions": [ ... ]
"pagination": {
"total": 1000
…

someone
- 100
- 2
- 8
1
vote
0 answers
Initial screen in Flutter app based on user's database property value
In my Flutter app, I am using Firebase auth for the authentication of users. I am successfully able to direct the user to a specific page based on the user's auth state (Signup page if they have not signed up before, and home page if they are…

Garrett
- 1,576
- 4
- 27
- 51
1
vote
3 answers
Flutter - Multiple Future with error "type 'Null' is not a subtype of type 'Widget'"
I've build a simple Splash screen. I'm using this package. Now, I'm trying to add version checker via Firebase Remote Config to my Splash Screen. I've written simple version checker code:
Future versionCheck(context) async {
//Get Current…

Wicaledon
- 710
- 1
- 11
- 26
1
vote
1 answer
FutureBuilder snapshot is empty but Future has correct data AND FutureBuilder constantly refreshing - Flutter
I have screens in a TabBarView that share data so I decided to wrap the TabBarView in a FutureBuilder and pass the data from that into both screens. The Future is called fetchUsersAndPosts() and it is meant to return [[*users], [*posts*]] but the…

Globe
- 514
- 3
- 17
1
vote
1 answer
Caching images (thumbnails) in Listview
I made a simple application where in listview I display a list of items by ListView.builder. Each item is a widget where by FutureBuilder I build a CircleAvatar with a picture taken in initState () via Api. I'm using the AppWrite API. The method…

pitcairn1987
- 57
- 6
1
vote
1 answer
Horizontal ListView not showing in release mode working fine in debug mode in flutter
'''
Container(
//padding: const EdgeInsets.only(left: 20),
child: FutureBuilder(
future: getContracts(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
…

Abubakar
- 97
- 8
1
vote
2 answers
type 'Future' is not a subtype of type 'Future>?'
- >?'
I want to get a list of languages in my flutter app from my sqflite db, but when I try create the lang list i get this error type 'Future' is not a subtype of type 'Future
- ?'
I tried everything but nothing change, how can i solve the…

rolex92
- 45
- 5
1
vote
0 answers
how to rebuild entire flutter app after saving preferences
I have an Homepage with dummy categories which wont update after i changed language inside the app. I use Easy localization package, and everything works fine. There are 3 pages on my app, but the Homepage is the only one that wont update. It does,…

Giovanni
- 512
- 2
- 6
- 23
1
vote
1 answer
Pagination with Future Builder and List of snapshots, Flutter
I want to implement pagination when calling APIs(without any packages) with my FutureBuilder, that calls 2 APIs at the same time since one depends on the other and I'm not sure how to do that. Here is the code below:
The ListView from…

GrandMagus
- 600
- 3
- 12
- 37
1
vote
1 answer
how to use "snapshot.hasData" with Dynamic Future builder
I had a String type future method but I had to do some modifications to the code and I changed my future method to dynamic future and everysince the future builder never validate if snapshot has data
late final Future myFuture;
@override
void…

taha khamis
- 401
- 4
- 22
1
vote
1 answer
Flutter FutureBuilder does not stop showing CircularProgressIndicator
I am trying to receive data using a FutureBuilder, but it hangs on the CircularProgressIndicator. I think it's remaining on ConnectionState.waiting but I'm not sure why.
@override
initState() {
_widgetList = getWidgetList();
}
…

Dillon Shah
- 25
- 2
1
vote
1 answer
Getting Unhandled Exception: type 'Null' is not a subtype of type 'Iterable' when trying to produce a feed
I am trying to retrieve a feed from Firestore, then build Widgets and present them in a ListView wrapped in a FutureBuilder.
Unfortunately, I keep getting this error:
E/flutter (20020): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled…

Dillon Shah
- 25
- 2
1
vote
0 answers
Update forms in FutureBuilder
I want to be able to update my forms in a futureBuilder. I need the futureBuilder to retrieve all the datas from the player in my DataBase. I am setting my initial values of my form right after I got the datas. When I'm trying to update de date…

zsupraz
- 33
- 5
1
vote
1 answer
There is a problem that is rebuild when I click TextField() in Flutter
My code includes FutureBuilder(), which get data from Firestore, and its child widgets include GridView.builder and TextField widgets etc.
When I click on a TexField(focus), the codes in FutureBuilder are rebuild.
The following is the test code for…

Kevin Yang
- 629
- 1
- 5
- 19