fix: video thumbnails on web null error

This commit is contained in:
Gordon Hayes
2022-11-25 11:52:04 +01:00
parent ddd8310b96
commit 0db682ac86
7 changed files with 26 additions and 13 deletions
@@ -195,7 +195,7 @@ class _FileTypeImage extends StatelessWidget {
shape: _getDefaultShape(context),
child: source.when(
local: () => StreamVideoThumbnailImage(
video: attachment.file!.path!,
video: attachment.file!.path,
placeholderBuilder: (_) => const Center(
child: SizedBox(
width: 20,
@@ -205,7 +205,7 @@ class _FileTypeImage extends StatelessWidget {
),
),
network: () => StreamVideoThumbnailImage(
video: attachment.assetUrl!,
video: attachment.assetUrl,
placeholderBuilder: (_) => const Center(
child: SizedBox(
width: 20,
@@ -41,7 +41,7 @@ class StreamVideoAttachment extends StreamAttachmentWidget {
return _buildVideoAttachment(
context,
StreamVideoThumbnailImage(
video: attachment.file!.path!,
video: attachment.file!.path,
thumbUrl: attachment.thumbUrl,
constraints: constraints,
),
@@ -54,7 +54,7 @@ class StreamVideoAttachment extends StreamAttachmentWidget {
return _buildVideoAttachment(
context,
StreamVideoThumbnailImage(
video: attachment.assetUrl!,
video: attachment.assetUrl,
thumbUrl: attachment.thumbUrl,
constraints: constraints,
),