fix attachment size

This commit is contained in:
Salvatore Giordano
2020-05-12 15:27:16 +02:00
parent 18ded607a8
commit 073f21dc5d
10 changed files with 267 additions and 137 deletions
+4 -2
View File
@@ -4,10 +4,12 @@ import 'package:stream_chat_flutter/src/utils.dart';
class FileAttachment extends StatelessWidget {
final Attachment attachment;
final Size size;
const FileAttachment({
Key key,
@required this.attachment,
this.size,
}) : super(key: key);
@override
@@ -18,8 +20,8 @@ class FileAttachment extends StatelessWidget {
launchURL(context, attachment.assetUrl);
},
child: Container(
width: 100,
height: 100,
width: size?.width ?? 100,
height: size?.height ?? 100,
child: Center(
child: Icon(Icons.attach_file),
),