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
2
votes
0 answers

Future builder not building list view in Flutter

I am new to flutter and I am trying to build up a list from what I have saved in shared preferences. I was able to build the list with the future builder by calling async function getTitles() in the future builder widget directly, but because of the…
Bimal
  • 23
  • 2
2
votes
1 answer

Futurebuilder snapshot has no data

CollectionReference users = FirebaseFirestore.instance.collection('Users'); FirebaseAuth auth = FirebaseAuth.instance; String uid = FirebaseAuth.instance.currentUser!.uid.toString(); var userData; var dbFuture; @override void…
2
votes
3 answers

Text widget doesn't appear in dialog after user Future.delayed in Flutter

I have a dialog that appears after user click on send button . When dialog appears , I want to show a text after 5 seconds . I use Future.delayed but the text doesn't appear at all . It appears only when I close the dialog and open it again . I want…
2
votes
2 answers

The argument type 'Future>' can't be assigned to the parameter type 'Future Function()' in onRefresh when using RefreshIndicator

I am having a Future that is fetching and populating users below Future> _fetchUsersListUsingLoop() async { try { var response = await http.get( Uri.parse( …
2
votes
1 answer

Using GetX in a FutureBuilder to build a list - the UI is not updated

I'm creating a todo list (sort of) app. I have a view where I use a FutureBuilder, it calls a function to fetch the articles from the SQLite db and show as Card. I have a getx_controller.dart which contains the list as observable: class Controller…
mlazzarotto91
  • 103
  • 3
  • 13
2
votes
1 answer

Flutter error: The argument type 'DocumentSnapshot? can't be assigned to parameter 'DocumentSnapshot

I get this Errorcode when I try to run my flutter app and I don't know how to solve it please help: Error: The argument type 'DocumentSnapshot?' can't be assigned to the parameter type 'DocumentSnapshot'…
tobsq
  • 27
  • 4
2
votes
2 answers

Flutter Secure Storage error Null check operator used on a null value

I am trying to make a Flutter app that contains a login screen and then home screen (only two screens for now). I am using Flutter Secure Storage and Http libraries too. Whenever the app launches, I want the app to check if two props, accessKey and…
2
votes
4 answers

Flutter FutureBuilder not updating when setState() is called

I have a DataProvider and a FutureBuilder. class _UserHeaderState extends State { @override Widget build(BuildContext context) { var _dataProvider = context.watch(); var _userProfile =…
Younghak Jang
  • 449
  • 3
  • 8
  • 22
2
votes
2 answers

Using StreamBuilder instead of FeatureBuilder to avoid whereIn 10 Limit in Firestore

I want to fetch the particular users' liked posts and show them in Staggered grid view. I can able to do this in FutureBuilder. But in FutureBuilder because of the whereIn limit of 10, I cannot fetch more. I know it can be implemented using…
2
votes
1 answer

Flutter FutureBuilder with lazy loading

Good Afternoon. I'm new in flutter, I want to ask if it is possible to implement lazy loading for data retrieved from API which is rendered using FutureBuilder. and this is my code. sorry for the api URL I filled dummy. Thank you the first for…
2
votes
3 answers

Flutter FutureBuilder snapshot returns Instance of 'Object' instead of data

i am new to flutter and trying to display data from a http post referencing from [1]https://flutter.dev/docs/cookbook/networking/background-parsing and [2]https://flutter.dev/docs/cookbook/networking/fetch-data i tried to display data on a…
Winters Free
  • 21
  • 1
  • 5
2
votes
2 answers

FutureBuilder Error: The return type 'Object?' isn't a 'Widget', as required by the closure's context

I am new to flutter and I am studying Future Builder, when I run the code below the line: return snapshot.data; is returning the following error: The return type 'Object?' isn't a 'Widget', as required by the closure's context. I figure this has…
Ian Rajkumar
  • 149
  • 1
  • 8
2
votes
1 answer

Why snapshot inside Future.Builder has never errors?

What's the right way to generate a snapshot.error for a FutureBuilder? I've a singleton to handle http requests, with a method: try { var response = await http.get(url); // Success if (response.statusCode == 200) { [...] } //…
Jumpa
  • 4,319
  • 11
  • 52
  • 100
2
votes
2 answers

Flutter display image picked from gallery

I am simply trying to pick an image and display it inside my app. For that I am using Flutter Image Picker. I added all the dependencies and I can select an image but I can not display it... This is what I tried: class _AddMemoryPageState extends…
Chris
  • 1,828
  • 6
  • 40
  • 108
2
votes
0 answers

Flutter FutureBuilder – Progress indicator is not showing while widgets are building in async function

I am new to Flutter and this is my first question on Stackoverflow. Please let me know if I need to provide more context or details for my question. In my app the user can navigate to a page with a two-level nested list widgets. When there are more…
Andrey Sorokin
  • 124
  • 2
  • 13