Fix image/video slight overflow error

codemagic-setup
Hank Grabowski 2023-11-18 15:35:24 -05:00
rodzic 45f3718c28
commit d939a56f2b
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -30,6 +30,8 @@ class _MediaAttachmentViewerControlState
@override
Widget build(BuildContext context) {
final item = widget.attachments[widget.index];
final width = widget.width! * 0.9;
final height = widget.height;
openMediaScreenCallback() {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MediaViewerScreen(
@ -42,8 +44,8 @@ class _MediaAttachmentViewerControlState
if (item.explicitType == AttachmentMediaType.video) {
return AVControl(
videoUrl: item.uri.toString(),
width: widget.width,
height: widget.height,
width: width,
height: height,
description: item.description,
onGoFullScreen: openMediaScreenCallback,
);
@ -53,8 +55,8 @@ class _MediaAttachmentViewerControlState
}
return ImageControl(
width: widget.width,
height: widget.height,
width: width,
height: height,
imageUrl: item.thumbnailUri.toString(),
altText: item.description,
onTap: openMediaScreenCallback,