This commit is contained in:
2024-09-03 13:44:35 +02:00
parent 34afc0b42a
commit 4c2d043188

View File

@@ -25,7 +25,7 @@ class _HomeState extends State<Home> {
final baseAPI = AppEnviroment.baseApiUrl; final baseAPI = AppEnviroment.baseApiUrl;
late Future<BusinessArguments> profile; late Future<BusinessArguments> profile;
late String proPicUrl; String proPicUrl = "empty";
ImageProvider<Object>? propicFile; ImageProvider<Object>? propicFile;
Future<BusinessArguments> getProfile() async { Future<BusinessArguments> getProfile() async {
@@ -70,13 +70,14 @@ class _HomeState extends State<Home> {
} else { } else {
busData = null; busData = null;
} }
//get profile picture if (proPicUrl == "empty") {
getFileUrlApiCall(userData).then((results) { getFileUrlApiCall(userData).then((results) {
setState(() { setState(() {
proPicUrl = results; proPicUrl = results;
propicFile = NetworkImage(proPicUrl); propicFile = NetworkImage(proPicUrl);
}); });
}); });
}
return BusinessArguments(userData, bUserData, busData); return BusinessArguments(userData, bUserData, busData);
} }
@@ -158,6 +159,7 @@ class _HomeState extends State<Home> {
@override @override
void initState() { void initState() {
profile = getProfile();
super.initState(); super.initState();
} }