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
1 answer

How to convert a json data into a List in flutter?

a sample of what i have in mind var url = 'https://www.googleapis.com/books/v1/volumes?q=egg'; Future getData() async { var response = await http.get(url); var responseBody = jsonDecode(response.body); // print(responseBody); …
0
votes
0 answers

How to fetch the data from a List type of future call and a simple future call in one program in flutter

I have tried calling a list and a simple future in a single program and I also searched for this in the web I didn't get a solution studentDetails.dart Future> studentDetails(http.Client client, var lin) async { print(lin); //Codes …
Spsnamta
  • 479
  • 6
  • 11
0
votes
1 answer

FutureBuilder - setState() or markNeedsBuild() called during build error

I have the below FutureBuilder entry. FutureBuilder( future: _checkConn, builder: (BuildContext context, AsyncSnapshot snapshot) { switch (snapshot.connectionState){ case…
0
votes
1 answer

Flutter/Dart - Open a view after a delay or break before

In the question "Open a view after a delay", copsOnRoad gives the following result: import 'dart:async'; // 1. Option with Timer Timer(Duration(seconds: 5), () { // 5s over, navigate to a new page Navigator.pushNamed(context,…
Uwe.Schneider
  • 1,112
  • 1
  • 15
  • 28
0
votes
1 answer

how to retrieve current user fields from firebase flutter

am trying to get some information for current user from firebase on flutter by using FutureBuilder. but its show me error says return new Scaffold( body: FutureBuilder( future: FirebaseFirestore.instance …
iKaka
  • 201
  • 1
  • 3
  • 8
0
votes
1 answer

How I achieve the following layout

I want build the layout that provided in the image and I had done that but I want Play all button also able to scroll as the Future list view builder. But I am unable to acheive that. I had used NEstedScrollView() wrap around DefaultTabController…
Sayuru_Sandaru
  • 320
  • 5
  • 12
0
votes
1 answer

List View in Flutter

I've been having trouble understanding how to correctly list of all the items from the API call, I have now made it to display the first from the list of the API, by adding the index [0] after the API response. I realize I can do that with the…
0
votes
1 answer

RangeError (index): Invalid value: Valid value range is empty: 0 | Flutter Firebase

Hy there. So my problem is this when the page loads it shows the follwing error for 1-2 seconds but then the data shows perfectly. It shouldn't have happen because i have provided "initialData" to "FutureBuilder". Can anybody tells me what i am…
0
votes
1 answer

Pass data from future to another future in the same page

I'm new to the Flutter world and mobile app development and struggling with how I should pass data throughout my app. This is my code, How can I pass data from future to another future on the same page? these are my two futures and my class and my…
Dhouib Omar
  • 35
  • 1
  • 3
0
votes
2 answers

The getter items was called on null

I am working on a simple ListView app that gets populated from the internet and storing in the database using Provider. But the ListView doesn't get populated. It was getting null on items getter. But after I changed with Consumer. Now I got an…
c49
  • 360
  • 1
  • 7
  • 18
0
votes
2 answers

type 'String' is not a subtype of type 'int' of 'index' The relevant error-causing widget was FutureBuilder

I am getting error at this point. The result works fine but it shows error for a second. I think this is because i'm using FutureBuilder inside a FutureBuilder. I need to call two methods at 'future:' so instead of that i used another FutureBuilder…
0
votes
1 answer

Attempt to display list data from Firestore causes overflow of pixels in flutter

I am attempting to display a list of data from firestore with this code: @override Widget build(BuildContext context) { // <1> Use FutureBuilder return FutureBuilder( // <2> Pass `Future` to future …
0
votes
1 answer

How to filter list when use FutureBuilder?

I use FutureBuilder in IndexedListView to show a phonebook list, Widget _buildBody(context) { String url = api_url_phonebook; return Padding( padding: const EdgeInsets.symmetric(horizontal: 10.0), child: Column( children: [ …
mikezang
  • 2,291
  • 7
  • 32
  • 56
0
votes
1 answer

Information from api doesn't show - Flutter

I have a problem with Future builder in Flutter. It gets the info from api successfully but doesn't show it. When I put print and print the info from api, it is ok and it shows the movies name without any problems. here is my code: class Search…
0
votes
0 answers

Login Flow Navigation using FutureBuilder: Flutter?

import 'package:flutter/material.dart'; class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return Consumer( builder: (BuildContext context, AppThemeNotifier value, Widget child) { …
user14027025