fix: Fix case when image is null
This commit is contained in:
+30
-28
@@ -356,42 +356,44 @@ class _MessageWidgetState extends State<MessageWidget> {
|
|||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
if (urlAttachment.imageUrl != null)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 16.0,
|
height: 16.0,
|
||||||
),
|
),
|
||||||
Container(
|
if (urlAttachment.imageUrl != null)
|
||||||
margin: EdgeInsets.symmetric(horizontal: 8.0),
|
Container(
|
||||||
child: Stack(
|
margin: EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
clipBehavior: Clip.antiAlias,
|
child: Stack(
|
||||||
children: [
|
clipBehavior: Clip.antiAlias,
|
||||||
CachedNetworkImage(imageUrl: urlAttachment.imageUrl),
|
children: [
|
||||||
Positioned(
|
CachedNetworkImage(imageUrl: urlAttachment.imageUrl),
|
||||||
left: 0.0,
|
Positioned(
|
||||||
bottom: 0.0,
|
left: 0.0,
|
||||||
child: Container(
|
bottom: 0.0,
|
||||||
child: Padding(
|
child: Container(
|
||||||
padding:
|
child: Padding(
|
||||||
const EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
|
padding: const EdgeInsets.only(
|
||||||
child: Text(
|
top: 8.0, left: 8.0, right: 8.0),
|
||||||
hostDisplayName,
|
child: Text(
|
||||||
style: TextStyle(
|
hostDisplayName,
|
||||||
fontWeight: FontWeight.w700,
|
style: TextStyle(
|
||||||
color: Color(0xFF006CFF),
|
fontWeight: FontWeight.w700,
|
||||||
|
color: Color(0xFF006CFF),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
borderRadius:
|
||||||
borderRadius:
|
BorderRadius.only(topRight: Radius.circular(16.0)),
|
||||||
BorderRadius.only(topRight: Radius.circular(16.0)),
|
color: Color(0xFFE9F2FF),
|
||||||
color: Color(0xFFE9F2FF),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8.0)),
|
||||||
),
|
),
|
||||||
clipBehavior: Clip.antiAlias,
|
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8.0)),
|
|
||||||
),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: widget.textPadding,
|
padding: widget.textPadding,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|||||||
Reference in New Issue
Block a user