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
2 answers
Flutter: get bool value from snapshot
I am trying to show an on-boarding screen so to do so I call an async function where I get a Future weather this is the first time the user launched the app. Since its a Future value I have decided to use FutureBuilder.
Here is part of the…

Davinci Cake
- 79
- 6
1
vote
2 answers
Access list of Custom Object in FutureBuilder
I have a method, fetches some data from url and gets json array response like
Future
- > getData(String url) async {
var response = await http.get(Uri.parse(url));
return List

Shashank Gb
- 902
- 1
- 6
- 14
1
vote
4 answers
type 'Null' is not a subtype of type 'DatabaseNotes' in type cast
The problem lies in the FutureBuilder widget section. I am trying to get the data from a snapshot in a FutureBuilder, but I get an error as 'type 'Null' is not a subtype of type 'DatabaseNotes' in type cast'. I tried declaring the _note field as…

Ozone317
- 39
- 6
1
vote
1 answer
flutter futureBuilder error NoSuchMethodError: Class '_JsonQuerySnapshot' has no instance method 'data'
I have been stuck on the futureBuilder with the following error:
I/flutter ( 5307): NoSuchMethodError: Class '_JsonQuerySnapshot' has no instance method 'data'.
I/flutter ( 5307): Receiver: Instance of '_JsonQuerySnapshot'
I/flutter ( 5307): Tried…

HaKim
- 277
- 2
- 12
1
vote
0 answers
Flutter: Convert future to stream to get realtime updates from API and rebuild widget
I'm learning flutter by building an app. I have a like button where I'm displaying the count of likes using a FutureBuilder like this :
FutureBuilder(
future: likeNotifier.getLikesCount(
postId: widget.postId,
),
builder:…

rawm
- 251
- 5
- 24
1
vote
1 answer
How to use FAB with FutureBuilder
What I would like to achieve: show a FAB only if a webpage responds with status 200.
Here are the necessary parts of my code, I use the async method to check the webpage:
class _MyHomePageState extends State {
int _counter = 0;
late…

cornemrc
- 45
- 6
1
vote
0 answers
How to update ui based on error in resolving future in getx
Can we access the error generated during resolving future in GetxController in UI the same way we can do in future with snapshot.error
When using Future builder we can do snapshot.hasError and then we can update the UI based on the error…

mumboFromAvnotaklu
- 35
- 2
- 5
1
vote
2 answers
flutter email sender as a background process
so i'm trying to send an email in flutter as a background process without having to navigate through the gmail app and i followed this tutorial https://www.youtube.com/watch?v=RDwst9icjAY
and every thing is working except 'onpressed(){}'function on…

Khaled
- 11
- 2
1
vote
2 answers
How can I update the data fetched from a future bilder in Flutter?
In my app I have a screen which contains 3 different future builders, I would like to update the data recovered from a future builder. I tried the setState () method but this updates all 3 future builders on the page, I only need to update one. How…

Luca Orlandi
- 55
- 5
1
vote
0 answers
ListTile onTap: Need to Check JWT in Secure Storage and Then Proceed with Named Page Navigation
New to Flutter, and I'm stumped on how to proceed with my App.
My user has already been authenticated via an API call, and the user's JWT is already stored in Flutter Secure Storage (I have verified that the token can be read from storage).
I would…

MySilmaril
- 185
- 2
- 13
1
vote
1 answer
ReorderableSliverList with Futurebuilder
I'm trying to populate a ReorderableSliverList with data from an API using FutureBuilder.
Model (RouteOrderTable)
RouteOrderTable(
{required this.deliveryPeriod,
required this.driverId,
required this.processId,
required…

Toxic
- 85
- 8
1
vote
0 answers
How to use the Get Package?
I’m using the Get package for accessing variables across dart files.
I’m quite new to flutter and am getting a future value error when I try to change the date variable for a future builder function with http requesting a JSON weburl.
Here’s my…

mk117
- 753
- 2
- 13
- 26
1
vote
2 answers
Future builder with ListView builder is not scrolling?
Listview builder in Future builder is not scrollable.
order_screen.dart
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../models_providers/order.dart';
import '../../services/global_methods.dart';
import…

Tushar Rai
- 2,371
- 4
- 28
- 57
1
vote
0 answers
Future builder with page transition cause lag
I have some troubles in my applications since I'm using different animated widget in combination of Future Builder (I think this is the problem).
For example when I perform a navigation to another page and in this page I retrieve data with future…

carlo97
- 169
- 1
- 3
- 12
1
vote
1 answer
Flutter appending fetched data to a listview inside a future builder
I'd like to ask when using the FutureBuilder to display fetched data from a remote server in a ListView. I check if the bottom of the ListView was reached using ScrollController. Everything is working well until I try to load new data and append…

Midas King
- 21
- 3