简体   繁体   English

如何在颤动视频播放器中设置边框半径?

[英]How to have border radius in flutter video player?

I am trying to have border-radius for the video player in my flutter app.我试图在我的颤振应用程序中为视频播放器设置边框半径。 I tried to use border-radius to the parent Container().我尝试使用 border-radius 到父容器()。 But it didn't work.但它没有用。

在此处输入图片说明

I got the result using ClipRRect.我使用 ClipRRect 得到了结果。 Just wrapped the video player with ClipRRect with some radius and it worked fine.刚刚用具有一定半径的 ClipRRect 包裹了视频播放器,效果很好。

    ClipRRect(
        borderRadius: BorderRadius.circular(15),
        child: VideoPlayer(_controller)
     )

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM