Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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(). But it didn't work.

enter image description here

like image 450
Humayun Rahi Avatar asked Dec 01 '22 09:12

Humayun Rahi


1 Answers

I got the result using ClipRRect. Just wrapped the video player with ClipRRect with some radius and it worked fine.

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

enter image description here

like image 139
Humayun Rahi Avatar answered Dec 04 '22 03:12

Humayun Rahi