This recipe demonstrates how to use the video_player package to stream a
video from the internet with basic play and pause controls using
the following steps:

Add the video_player dependency.

Add permissions to your app.

Create and initialize a VideoPlayerController.

Display the video player.

Play and pause the video.

1. Add the video_player dependency

This recipe depends on one Flutter plugin: video_player. First, add this
dependency to your pubspec.yaml.

dependencies

flutter

sdk

flutter

video_player

2. Add permissions to your app

Next, update your android and ios configurations to ensure
that your app has the correct permissions to stream videos
from the internet.

Android