From 34afc0b42a819936299f111250f5114d31cd119d Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Tue, 3 Sep 2024 13:32:33 +0200 Subject: [PATCH] multiple api calls for profile picture fix --- Frontend/patient_manager/lib/pages/home.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontend/patient_manager/lib/pages/home.dart b/Frontend/patient_manager/lib/pages/home.dart index c50c05a5..ecc7be27 100644 --- a/Frontend/patient_manager/lib/pages/home.dart +++ b/Frontend/patient_manager/lib/pages/home.dart @@ -70,6 +70,7 @@ class _HomeState extends State { } else { busData = null; } + //get profile picture getFileUrlApiCall(userData).then((results) { setState(() { proPicUrl = results; @@ -157,14 +158,13 @@ class _HomeState extends State { @override void initState() { - profile = getProfile(); super.initState(); } @override Widget build(BuildContext context) { return FutureBuilder( - future: profile, + future: getProfile(), builder: (BuildContext context, snapshot) { if (snapshot.connectionState == ConnectionState.done) { if (snapshot.hasData) {