Add a variable to the State class to store the VideoPlayerController

Add a variable to the State class to store the Future returned from
  VideoPlayerController.initialize

Create and initialize the controller in the initState method

Dispose of the controller in the dispose method

4. Display the video player

Now, display the video. The video_player plugin provides the
VideoPlayer widget to display the video initialized by
the VideoPlayerController.
By default, the VideoPlayer widget takes up as much space as possible.
This often isn’t ideal for videos because they are meant
to be displayed in a specific aspect ratio, such as 16x9 or 4x3.

Therefore, wrap the VideoPlayer widget in an AspectRatio
widget to ensure that the video has the correct proportions.