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

Textwidget is null when waiting data in futurebuilder

So i have a problem with the futurebuilder. first here is my code: FutureBuilder( future: DBProvider.db.getAllTasks(), builder:(BuildContext context, AsyncSnapshot snapshot) { if…
0
votes
1 answer

instance of 'X' even after using FutureBuilder Flutter

I have a flutter app that uses the [flutter_wordpress] package to make HTTP requests to WordPress REST API v2. Everything is great except for the fact that I get ''instance of Categoryeven after using theFutureBuilder`` widget backend import…
Hussein Al-Mosawi
  • 1,464
  • 3
  • 17
  • 37
0
votes
0 answers

Get Api Works in Emulator but not in Real device Flutter

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ type 'StateError' is not a subtype of type 'String' The relevant error-causing widget was: FutureBuilder>…
0
votes
1 answer

why futureBuilder callback is not calling after facebook logged in data in flutter?

I am newbie in flutter so please let me know if i am wrong.In my application i have to logged in using facebook so i took a RawMaterialButton and in onPressed function in used following code child: RawMaterialButton( onPressed:…
Emon
  • 452
  • 3
  • 11
  • 21
0
votes
1 answer

FutureBuilder doesn't update when updating the database

I was working in a simple notes app in flutter, this is my code. i just made this example to preview the problem This is the home page that navigate to a create page, and uses a futureBuilder to display the data from the database import…
0
votes
1 answer

Flutter : How to use scope Model (or any state management package) with dynamic range slider? Edited

I have an app need to use scope model as a simplest state management (may be),I have a dynamic range slider (inside loop) which received it values from database ,I want when I move any slide to use scope model for updating the value of moved slider…
0
votes
1 answer

Getting data from an API in flutter

Tring to fetch data using API My code class _MyAppState extends State { Future news; @override void initState() { super.initState(); news = fetchNews(); } @override Widget build(BuildContext context) { // TODO:…
0
votes
2 answers

Flutter FutureBuilder rebuilds unnecessarily when navigate between screens

My FutureBuilder rebuilds unnecessarily when navigate between screens. Each time I have to get the download URL from the Firebase Storage and this results in extremely flickering. How can I prevent that the FutureBuilder rebuilds everytime I…
Vueer
  • 1,432
  • 3
  • 21
  • 57
0
votes
1 answer

flutter future change value when inside future builder

hello I'm new to flutter and building my first app , can I change a value in future function in builder based on a value change then reset it to the way it was when app is terminated ? Archive.dart class _ArchiveState extends State { …
Nada Khaled
  • 149
  • 2
  • 9
0
votes
2 answers

Why this future function is returning empty list flutter

I am new with flutter having issues with the future functions. I had a single await function on other screen and its returning list but when I use multiple await function in a single future function it returns an empty list and executes before many…
0
votes
1 answer

I want to add images path in SharedPreferences, but don't know to do

I write a function which return List of Image and used in ListView, but I also want to make file for each and every image and stored the that file path in SharedPreferences. import 'package:image/image.dart' as imglib; Future>…
0
votes
1 answer

The method '[]' was called on null. Flutter?

My futurebuilder is occure error above anyone have any solution The relevant error-causing widget was: FutureBuilder…
Aakib Khan
  • 19
  • 5
0
votes
1 answer

Flutter DropDownButton using FutureBuilder to get JSON data

I am trying to add a list of string to a DropdwonButton coming from a future, but it is not working properly, I am new to flutter. I wrote a FutureBuilder to get data from API (Lits of countries) it works just fine but when I add data to the…
Taha teber
  • 20
  • 7
0
votes
1 answer

REST GET is returning invalid arguments in Future Builder

I'm using a Rest API to call a GET method to fetch some Data. I'm doing this to load a profile to view inside my flutter body. I'm trying to assign these data to String variables inside the FutureBuilder method . In the future builder , the…
Jason Waku
  • 273
  • 7
  • 20