Questions tagged [flutter-futurebuilder]

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.

Reference:

667 questions
0
votes
0 answers

FutureBuilder : "Expected a value of type 'Future>?', but got one of type '_JsonMap'"

On trying to pass a Future-Map to the future builder widget , it gives the error below. The JsonMap has been cast to a Future-Map using the cast-as operator and the value has been returned using Future.value(),but the below error still…
srt111
  • 1,079
  • 11
  • 20
0
votes
1 answer

Flutter FutureBuilder/Stream how to show 2 different widgets in ConnectionState.waiting depending on given time

I want to show a Text() widget in the first second of ConnectionState.waiting, but if it takes longer than a second, I want to show a different Widget with a custom Animation. Simplified code (StatelessWidget): ... Stream ... if…
Marcel Dz
  • 2,321
  • 4
  • 14
  • 49
0
votes
2 answers

Wait a function to be done in ListView

I need to wait my function to be done in a ListView because of a Firestore request. I tried using Future.wait() but it does not work. FutureBuilder( future: FirebaseFirestore.instance …
user15087335
0
votes
1 answer

FutureBuilder as child of AlertDialog not working

I have FutureBuilder inside an AlertDialog box. Initially, on clicking a floating action button a alertdialog opens in which there is a submit button.On clicking it I call another function with FutureBuilder inside it because I want to show a…
0
votes
1 answer

How to persist value from a Future when switching between pages in Flutter?

I am trying to add a widget to the screen when the future has data in Screen 1. class UserChoiceBooks extends StatelessWidget { final String title; UserChoiceBooks({Key key, this.title}) : super(key: key); @override Widget build(BuildContext…
wick3d
  • 1,164
  • 14
  • 41
0
votes
1 answer

Flutter - not able to fire FutureBuilder when I receive data

I'm still have a problem with the refresh of my screen after a function returns data. This is my code: return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: FutureBuilder>( future:…
SteMMo
  • 392
  • 1
  • 4
  • 23
0
votes
1 answer

FutureBuilder Completely Unresponsive

My process is as follows. The screen has just two elements - TextFormField and an ElevatedButton. Get email address from user User clicks button Button validates input, then Calls FutureBuilder, which Tries to fetch client record from REST…
0
votes
1 answer

FutureBuilder does not complete when using an Anmiation inside

I have a FutureBuilder, where I retrieve data from Firestore. I do that in initState, as it was often suggested here. Future _tour; @override void initState() { super.initState(); _tour =…
Lars
  • 1,250
  • 9
  • 25
0
votes
1 answer

Flutte - JSON deserialized data fetched to FutureBuilder return null value

I'm trying to return ListView of photos via FutureBuilder fetched with data from API. While values are added to List in my service and assigned properly, values fetched to List Builder are null. I don't know why calling service method to return…
0
votes
1 answer

Parse a JSON file using class in Flutter

I have a following problem. I just cannot understand what can be the easiest way to parse an information from JSON to an array of objects in flutter. I have a following class: class Organization { String subject; String organization; String…
Michał Śniady
  • 119
  • 3
  • 14
0
votes
1 answer

flutter error with futurebuilder and http json

hello i'm working on an app with flutter and i have an error with Futurebuilder i dont understand please help i trying to get title and desc depending of id with a future builder this is my json {"title":"15%GANT","desc":"donne 15 % sur les…
0
votes
1 answer

List is not a subtype of Map - Flutter

I'm trying to fetch data from server that looks like this: [ { "key": "value", "key": "value", "key": "value", "key": "value", "key": [ "key": "value", "key": "value", ], "key": "value", …
Manish Paul
  • 424
  • 1
  • 8
  • 17
0
votes
0 answers

Flutter JSON parsing in constructor

I'm trying to parse a JSON file from the web, and while I can parse most of the fields, I can't seem to pass some of them inside the constructor. Some come out fine, the others come out as null. This is my constructor Event({ this.title, …
bqubique
  • 678
  • 6
  • 17
0
votes
1 answer

Flutter getting range error while trying to delete items inside futurebuilder with Dismissible ListView

I want to have a list of items from my firestore, which I want to display and the user can dismiss them. (Im doing this with FirebaseApi().getSwiperData(fooNotifier) which is giving me a copy of the data I want) If the list is empty I want to show a…
Marcel Dz
  • 2,321
  • 4
  • 14
  • 49
0
votes
1 answer

how to update the FutureBuilder text every time the shared-preference is updated

I wanted to keep the time data stored in the mobile localcaly so when ever the app is closed and open backed i want it to be shown. that part works but when ever the button is pressed to set new time it wont update to the newly set sharedprefence to…