fix video thumbnail

This commit is contained in:
Salvatore Giordano
2020-11-26 15:18:59 +01:00
parent 4d35c3a151
commit a59dddc514
2 changed files with 12 additions and 41 deletions
+12 -4
View File
@@ -1316,10 +1316,18 @@ class MessageInputState extends State<MessageInput> {
children: [
Positioned.fill(
child: Container(
child: VideoThumbnail(
file: File(
attachment.file.path,
),
child: FutureBuilder<File>(
future: VideoCompress.getFileThumbnail(attachment.file.path),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return Offstage();
}
return Image.file(
snapshot.data,
fit: BoxFit.cover,
);
},
),
),
),