How to have border radius in flutter video player?

Viewed 2889

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

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

Related