skip to Main Content

Flutter – How to call async function in futter FutureBuilder widget?

Here is my code return FutureBuilder( future: dbHelper.abonnements(), builder: (context,snapshot){ if(snapshot.data==null){ return StartUpScreen(); }else{ final meterId = snapshot.data![0].meterId; final clientId = snapshot.data![0].clientId; final abonnement = snapshot.data![0]; final compteur = await MeterAPIManager.getMeter(meterId); final user = await ClientAPIManager.getUser(clientId); return HomeScreen(abonnement: abonnement,compteur: compteur,user:…

VIEW QUESTION
Back To Top
Search