【发布时间】:2022-12-14 20:29:26
【问题描述】:
我试图制作一个带有视频的容器,但当然不可能将完整的视频放入尺寸容器中,我尝试使用 fit,但甚至有错误,所以我尝试使用剪辑,这里是谁想要的解决方案:
如果有办法使用合适的封面,有人吗???
代码夹在这里:它工作正常:
ClipRect(
clipBehavior: Clip.hardEdge,
child: Container(
width: double.infinity, \\ another size
height: 400, \\another size
alignment: Alignment.center,
child: Transform.scale( scale: 2,
child: AspectRatio( aspectRatio: _controller!.value.aspectRatio,
child: VideoPlayer(_controller as VideoPlayerController)
),
),
),
),
【问题讨论】:
标签: android flutter video scale clip