fix 2
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user