fix(ui): video breaks bottom photo carousel.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -225,11 +225,12 @@ class _StreamGalleryFooterState extends State<StreamGalleryFooter> {
|
|||||||
if (attachment.type == 'video') {
|
if (attachment.type == 'video') {
|
||||||
media = InkWell(
|
media = InkWell(
|
||||||
onTap: () => widget.mediaSelectedCallBack!(index),
|
onTap: () => widget.mediaSelectedCallBack!(index),
|
||||||
child: FittedBox(
|
child: AspectRatio(
|
||||||
fit: BoxFit.cover,
|
aspectRatio: 1,
|
||||||
child: StreamVideoThumbnailImage(
|
child: StreamVideoThumbnailImage(
|
||||||
video: (attachment.file?.path ??
|
video: (attachment.file?.path ??
|
||||||
attachment.assetUrl)!,
|
attachment.assetUrl)!,
|
||||||
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -97,8 +97,9 @@ class _StreamVideoThumbnailImageState extends State<StreamVideoThumbnailImage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!snapshot.hasData) {
|
if (!snapshot.hasData) {
|
||||||
return Container(
|
return SizedBox(
|
||||||
constraints: const BoxConstraints.expand(),
|
height: double.maxFinite,
|
||||||
|
width: double.maxFinite,
|
||||||
child: widget.placeholderBuilder?.call(context) ??
|
child: widget.placeholderBuilder?.call(context) ??
|
||||||
Shimmer.fromColors(
|
Shimmer.fromColors(
|
||||||
baseColor: _streamChatTheme.colorTheme.disabled,
|
baseColor: _streamChatTheme.colorTheme.disabled,
|
||||||
@@ -106,16 +107,22 @@ class _StreamVideoThumbnailImageState extends State<StreamVideoThumbnailImage> {
|
|||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'images/placeholder.png',
|
'images/placeholder.png',
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
height: widget.height,
|
||||||
|
width: widget.width,
|
||||||
package: 'stream_chat_flutter',
|
package: 'stream_chat_flutter',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Image.memory(
|
return SizedBox(
|
||||||
snapshot.data!,
|
height: double.maxFinite,
|
||||||
fit: widget.fit,
|
width: double.maxFinite,
|
||||||
height: widget.height,
|
child: Image.memory(
|
||||||
width: widget.width,
|
snapshot.data!,
|
||||||
|
fit: widget.fit,
|
||||||
|
height: widget.height,
|
||||||
|
width: widget.width,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user