fix multiple api calles to get profile picture
This commit is contained in:
@@ -70,7 +70,12 @@ class _HomeState extends State<Home> {
|
|||||||
} else {
|
} else {
|
||||||
busData = null;
|
busData = null;
|
||||||
}
|
}
|
||||||
|
getFileUrlApiCall(userData).then((results) {
|
||||||
|
setState(() {
|
||||||
|
proPicUrl = results;
|
||||||
|
propicFile = NetworkImage(proPicUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
return BusinessArguments(userData, bUserData, busData);
|
return BusinessArguments(userData, bUserData, busData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,13 +168,6 @@ class _HomeState extends State<Home> {
|
|||||||
builder: (BuildContext context, snapshot) {
|
builder: (BuildContext context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
if (snapshot.hasData) {
|
if (snapshot.hasData) {
|
||||||
getFileUrlApiCall(snapshot.requireData.signedInUser)
|
|
||||||
.then((results) {
|
|
||||||
setState(() {
|
|
||||||
proPicUrl = results;
|
|
||||||
propicFile = NetworkImage(proPicUrl);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return HomeTileGrid(
|
return HomeTileGrid(
|
||||||
signedInUser: snapshot.requireData.signedInUser,
|
signedInUser: snapshot.requireData.signedInUser,
|
||||||
businessUser: snapshot.data!.businessUser,
|
businessUser: snapshot.data!.businessUser,
|
||||||
|
|||||||
Reference in New Issue
Block a user