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
1
vote
0 answers

How to convert FutureBuilder into StreamBuilder

I made a widget that should automatically update if there are changes to the Hive database value. I have just learned that Futures only get the value once, so I need a Stream to constantly monitor changes. Now, how can I use StreamBuilder with my…
1
vote
2 answers

Change a dropdown's items when another dropdown's value is chosen in flutter (UI wont update)

I have two drop downs, and I want to do things when they get values selected. One of those is to change the second buttondrop items based on what's selected in the first dropdown. For example: Dropdown1 is a list of car manufactuers Dropdown2 is a…
1
vote
0 answers

Dynamic TabBar and TabBarView with REST API data: Flutter

I am working on a Flutter Application in which I am fetching data from the REST APIs. My case- The screen consists of a top TabBar which contains a dynamic number of tabs depending on the number of topics fetched from a REST API (These topics will…
ayush
  • 464
  • 5
  • 17
1
vote
1 answer

Flutter GoogleMaps onCameraMove and Future JSON

So i am using the googlemaps package and when a user zooms in/out i need to show/hide various markers based on distance. the markers data comes from a json future. I can see it zoom in/out, but i cannot get it to loop through my amenities future. i…
jamie1231
  • 29
  • 4
1
vote
0 answers

Future Builder with for loop in flutter

In my application, I have two future builders: CollectionReference stream = Firestore.instance.collection('users'); List myIDs =[]; List mylist =[]; List myNames =[]; String? userName; Widget userValues() { …
1
vote
3 answers

Flutter dropdown with future builder

This is my data model class RoleModel { int? id; String? role; RoleModel({this.id, this.role}); RoleModel.fromJson(Map json) { id = json['id']; role = json['role']; } Map toJson() { final…
1
vote
2 answers

how to create dynamic list of futures for futurebuilder

I have a longList where I need each element in the list to be sent to a database to return some a sub-list. I then display each value in it's own PageView using PageView.builder. and FutureBuilder. At first I was setting future:…
1
vote
1 answer

FutureBuilder is not building asynchronous in Flutter

I have this FutureBuilder with the future beeing a request for a boolena value from firestore. But when I update the value (hasAccountSetup becames true), nothnig happens until I do a quick reload of the app. I don't know if I should't be using…
1
vote
2 answers

Flutter FutureBuilder stuck at ConnectionState.waiting

I'm new and currently learning Flutter, I have a question about FutureBuilder. My code is stuck at ConnectionState.waiting and I'm not sure why. My codes are import 'dart:convert'; import 'package:flutter/material.dart'; import…
Eli
  • 27
  • 4
1
vote
2 answers

Flutter Future Issues causing The argument type 'Future>' can't be assigned to the parameter type 'List' error

I am having an issue with my code. Essentially, what I am trying to do is dynamically create cards that display file information, after pulling the data from a sqflite database. The issue I have is that my ListView has a return type of…
dstoner
  • 49
  • 1
  • 5
1
vote
1 answer

Future Builder not rendering data table

in want create table from api response.i created data table using future builder. The future builder fires api twice not not return any data class HomeScreen extends StatefulWidget { const HomeScreen({super.key}); @override State
Hari .S
  • 59
  • 6
1
vote
3 answers

navigation inside Futurebuilder

I am trying to navigate after login inside futurebuilder. api request done successfully but navigation getting error while testing. Help me How to use futurebuilder properly. child: ElevatedButton( onPressed: () { …
1
vote
1 answer

how do I count data that has been recorded by the current user?

This is the getUserId and my function to count data that required the userId: String get getuserId => AuthService.firebase().currentUser!.id; Future myCollectionPrayer({required String userId}) => …
1
vote
1 answer

Flutter handle future response

i want to store token value and navigate home page using go router after login. i dont know how to handle json data like display or (retrieve)name and role.. i am newbie for programming. Help me.thanks in advance.i tried futurebuilder examples it…
1
vote
1 answer

How to show insert data into list view builder without reload application in flutter

I have created a sqlite crud application from flutter. my app data insert into the table successfully. but when i show that inserted date from listview need to reload app.in my app data insert from a separate screen. data have shown on home screen.…
sameera
  • 23
  • 5