Align business preview to personal preview
This commit is contained in:
@@ -49,6 +49,7 @@ class _MihBusinessProfilePreviewState extends State<MihBusinessProfilePreview> {
|
|||||||
builder: (context, asyncSnapshot) {
|
builder: (context, asyncSnapshot) {
|
||||||
if (asyncSnapshot.connectionState == ConnectionState.done &&
|
if (asyncSnapshot.connectionState == ConnectionState.done &&
|
||||||
asyncSnapshot.hasData) {
|
asyncSnapshot.hasData) {
|
||||||
|
if (asyncSnapshot.requireData != "") {
|
||||||
return MihCircleAvatar(
|
return MihCircleAvatar(
|
||||||
imageFile: NetworkImage(asyncSnapshot.requireData),
|
imageFile: NetworkImage(asyncSnapshot.requireData),
|
||||||
width: profilePictureWidth,
|
width: profilePictureWidth,
|
||||||
@@ -65,6 +66,14 @@ class _MihBusinessProfilePreviewState extends State<MihBusinessProfilePreview> {
|
|||||||
return Icon(
|
return Icon(
|
||||||
MihIcons.iDontKnow,
|
MihIcons.iDontKnow,
|
||||||
size: profilePictureWidth,
|
size: profilePictureWidth,
|
||||||
|
color:
|
||||||
|
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return Icon(
|
||||||
|
MihIcons.mihRing,
|
||||||
|
size: profilePictureWidth,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@@ -79,13 +88,20 @@ class _MihBusinessProfilePreviewState extends State<MihBusinessProfilePreview> {
|
|||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
|
widget.business.type,
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.myLocation != null || widget.myLocation!.isEmpty
|
widget.myLocation != null || widget.myLocation!.isEmpty
|
||||||
? calculateDistance()
|
? calculateDistance()
|
||||||
: "0.00 km",
|
: "0.00 km",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 12,
|
fontSize: 10,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user