Align business preview to personal preview

This commit is contained in:
2025-07-10 10:16:52 +02:00
parent 46ab131ce9
commit ab8b722e5e

View File

@@ -49,21 +49,30 @@ 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) {
return MihCircleAvatar( if (asyncSnapshot.requireData != "") {
imageFile: NetworkImage(asyncSnapshot.requireData), return MihCircleAvatar(
width: profilePictureWidth, imageFile: NetworkImage(asyncSnapshot.requireData),
editable: false, width: profilePictureWidth,
fileNameController: TextEditingController(), editable: false,
userSelectedfile: file, fileNameController: TextEditingController(),
frameColor: userSelectedfile: file,
MzanziInnovationHub.of(context)!.theme.secondaryColor(), frameColor:
backgroundColor: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
MzanziInnovationHub.of(context)!.theme.primaryColor(), backgroundColor:
onChange: () {}, MzanziInnovationHub.of(context)!.theme.primaryColor(),
); onChange: () {},
);
} else {
return Icon(
MihIcons.iDontKnow,
size: profilePictureWidth,
color:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
);
}
} else { } else {
return Icon( return Icon(
MihIcons.iDontKnow, MihIcons.mihRing,
size: profilePictureWidth, 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,
), ),
), ),
], ],