extract videoattachment

This commit is contained in:
Salvatore Giordano
2020-04-22 11:55:05 +02:00
parent 7460651380
commit 17c171f984
5 changed files with 166 additions and 123 deletions
+35
View File
@@ -0,0 +1,35 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:stream_chat/stream_chat.dart';
class AttachmentError extends StatelessWidget {
final Attachment attachment;
const AttachmentError({
Key key,
@required this.attachment,
}) : super(key: key);
@override
Widget build(BuildContext context) {
if (attachment.localUri != null) {
return Image.file(
File(attachment.localUri.path),
);
}
return Center(
child: Container(
width: 200,
height: 140,
color: Color(0xffd0021B).withOpacity(.1),
child: Center(
child: Icon(
Icons.error_outline,
color: Colors.white,
),
),
),
);
}
}