add image picker

This commit is contained in:
Salvatore Giordano
2020-02-28 17:02:10 +01:00
parent 992d63bb5a
commit 1fea1fd19b
4 changed files with 227 additions and 74 deletions
+4 -3
View File
@@ -211,7 +211,7 @@ class _MessageWidgetState extends State<MessageWidget>
borderRadius: boxDecoration.borderRadius,
child: Container(
decoration: boxDecoration,
constraints: BoxConstraints.loose(Size.fromWidth(300)),
constraints: BoxConstraints.loose(Size(300, 500)),
child: Stack(
children: <Widget>[
Column(
@@ -222,7 +222,7 @@ class _MessageWidgetState extends State<MessageWidget>
attachment.title != null
? Container(
constraints:
BoxConstraints.loose(Size.fromHeight(70)),
BoxConstraints.loose(Size(300, 500)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
@@ -549,7 +549,8 @@ class _MessageWidgetState extends State<MessageWidget>
Attachment attachment,
) {
return CachedNetworkImage(
imageUrl: attachment.thumbUrl ?? attachment.imageUrl,
imageUrl:
attachment.thumbUrl ?? attachment.imageUrl ?? attachment.assetUrl,
fit: BoxFit.cover,
);
}