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
2
votes
0 answers
location.getLocation() does not access my location
I use these packages
google_maps_flutter: ^2.2.3
flutter_polyline_points: ^1.0.0
location: ^4.4.0
The fact is that when I test on the emulator, this command works correctly. She's tracking tracking location
await…

N.E.K
- 37
- 4
2
votes
0 answers
my flutter app is not taking location in real device at first time but work properly in emulator?
This code is working fine in emulator but it doesn't work properly in real device . This code for taking user location but when i open 1st time app it only ask permission for location and doesn't getlocation if restart my application then it take…

Luffy
- 23
- 3
2
votes
2 answers
Can I Use a Future to 'Fill In' a Text() Widget Instead of Using FutureBuilder in Flutter?
I'm trying to better understand Futures in Flutter. In this example, my app makes an API call to get some information of type Future. I'd like to display this information in a Text() widget. However, because my String is wrapped in a Future…

MySilmaril
- 185
- 2
- 13
2
votes
2 answers
My FutureBuilder on my home screen keeps reloading (but ONLY when on other screens)?
I am encountering a very bizarre problem with my FutureBuilder on my home screen that only shows up when I've navigated to other pages and then it keeps reloading (I've verified by putting breakpoints on my home screen).
I'm fairly certain this is…

usafutb0l3r
- 69
- 9
2
votes
1 answer
can we use FutureBuilder with Void type
my question is can we use FutureBuilder with Void callbacks on using such methods whome type is
Future fun_name() async{ body }
after creating such methods how can we pass that method to FutureBuilder widget on whatever thy type is/.

Aqeel Mughal
- 2,105
- 2
- 6
- 14
2
votes
2 answers
Flutter, How can I add a loading spinner indicator while my data is being send to the back within my code?
This is my current screen. I need to add a loading spinner so that the user doesn't need to wait for 5 seconds until the data is sent to the back and returns the expected response. I added a comment where I call the function "uploadImage" and it's…
2
votes
2 answers
Flutter - How to pass a future to a widget without executing it?
I am using FutureBuilder in one of my widgets and it requires a future. I pass the future to the widget through its constructor. The problem is that while passing the future to the widget it gets automatically executed. Since the FutureBuilder…

irshukhan
- 169
- 2
- 2
- 12
2
votes
1 answer
Can I use a FutureBuilder with a value of the type FutureOr?
I was wondering if there is a way how I can use a Future Builder together with a FutureOr typed future-parameter?
2
votes
2 answers
Flutter/Dart Logic for assigning an API Future's return value to another variable/function
I think my lack of in-depth oop or async/wait knowledge may be hurting me here but I could not seem to find a working solution for myself. Please be kind.
Creating a basic countdown app for which I'm avoiding hard-coding the end-date but instead…

metricHero
- 69
- 1
- 7
2
votes
1 answer
FutureBuilder snapshot data type is not correct
I am using a Flutter FutureBuilder widget and SharedPreferences, to wait for the preferences to be loaded before using them to get the language and pass them to child widgets.
Here is my code:
import 'package:flutter/material.dart';
import…

bolino
- 867
- 1
- 10
- 27
2
votes
1 answer
How to combine features of FutureProvider/FutureBuilder (waiting for async data) and ChangeNotifierProvider (change data and provide on request)
What I wanted to achieve, was to retrieve a document from firestore, and provide it down the widget tree, and be able to make changes on the data of the document itself.
show something like "No data available/selected" when there's nothing to…

Cedric
- 470
- 6
- 20
2
votes
0 answers
How to code dynamic FlipCard List with FutureBuilder in Flutter
I am very new at flutter and I tried writing "body: new ListView.builder....." but it does not work, I am getting always red underline. Can you help me to fix this. I am getting the data to the flipcards from json albüm so I think I must use future…

Oktay Çağlar
- 21
- 1
2
votes
1 answer
Ho do I view the pickImage XFile after deprecating the getImage imagePicker
When I changed the deprecated ImagePicker package getImage to pickImage the future image builder didnt show the image again how can I solve this problem.
final picker = ImagePicker();
late Future pickedFile =…

Bareq Raad
- 71
- 1
- 8
2
votes
3 answers
Cannot Scroll ListView inside FutureBuilder
I have tried almost all the solution on stackoverflow like using Expanded widget with single child scroll view and physics property and what not but still cannot enable scroll inside futurebuilder which occupy second half of my screen, the first…

Rahul Pandey
- 520
- 3
- 15
2
votes
1 answer
How to call and API endpoint on initialize. Value is still null
I am trying to get user information from an API. For this, I created a user object. I want to call the function and store it in a user. But the problem is, that I cannot use await and wait till all the data is there.
So instead of async and await, I…

Jay
- 231
- 1
- 12