I am using VideoPlayer to play an .mp4 video that is uploaded to my website. I set the height and width and it works as I expect in Android, but in Flutter Web the width doesn't match the width of the container.
Container(//
alignment: Alignment.center,
margin: const EdgeInsets.only(top: 20),
height: 130,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
color: Colors.black12, border:
Border.all(color: Colors.black)),
child: SizedBox(width: double.infinity,
child: ClipRRect(borderRadius:
BorderRadius.circular(8),
child: VideoPlayer(HomePage._controller1)
)
)
),
I need some trick to make my video full width or fit to it's parent.
I would prefer using AspectRation for this.