add defualt text

This commit is contained in:
2025-07-10 11:17:23 +02:00
parent 2b8ca4ef50
commit 5d4c36626b

View File

@@ -36,53 +36,57 @@ class _MihPersonalProfilePreviewState extends State<MihPersonalProfilePreview> {
return Row( return Row(
children: [ children: [
FutureBuilder( FutureBuilder(
future: futureImageUrl, future: futureImageUrl,
builder: (context, asyncSnapshot) { builder: (context, asyncSnapshot) {
if (asyncSnapshot.connectionState == ConnectionState.done && if (asyncSnapshot.connectionState == ConnectionState.done &&
asyncSnapshot.hasData) { asyncSnapshot.hasData) {
if (asyncSnapshot.requireData != "") { if (asyncSnapshot.requireData != "") {
return MihCircleAvatar( return MihCircleAvatar(
imageFile: NetworkImage(asyncSnapshot.requireData), imageFile: NetworkImage(asyncSnapshot.requireData),
width: profilePictureWidth, width: profilePictureWidth,
editable: false, editable: false,
fileNameController: TextEditingController(), fileNameController: TextEditingController(),
userSelectedfile: file, userSelectedfile: file,
frameColor: frameColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.secondaryColor(),
backgroundColor: backgroundColor:
MzanziInnovationHub.of(context)!.theme.primaryColor(), MzanziInnovationHub.of(context)!.theme.primaryColor(),
onChange: () {}, onChange: () {},
); );
} else {
return Icon(
MihIcons.iDontKnow,
size: profilePictureWidth,
color:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
);
}
} else { } else {
return Icon( return Icon(
MihIcons.mihRing, MihIcons.iDontKnow,
size: profilePictureWidth, size: profilePictureWidth,
color: color:
MzanziInnovationHub.of(context)!.theme.secondaryColor(), MzanziInnovationHub.of(context)!.theme.secondaryColor(),
); );
} }
}), } else {
return Icon(
MihIcons.mihRing,
size: profilePictureWidth,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
);
}
},
),
const SizedBox(width: 15), const SizedBox(width: 15),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
widget.user.username, widget.user.username.isNotEmpty
? widget.user.username
: "Username",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 18, fontSize: 18,
), ),
), ),
Text( Text(
"${widget.user.fname} ${widget.user.lname}", widget.user.fname.isNotEmpty
? "${widget.user.fname} ${widget.user.lname}"
: "Name Surname",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 15, fontSize: 15,