Repository: flutter
Issue: [video_player ] Document how to dispose multiple videos properly. 
Labels: d: examples,p: video_player,package,team-ecosystem,P3,triaged-ecosystem

I am facing issue when call dispose for VideoPlayerController. Android Issue Log : VideoPlayerController was used after being disposed. 

```
VideoPlayerController _controller = VideoPlayerController.file(
            File("C:/test/a.mp4"))
          ..initialize().then((_) {
            setState(() {});
          });
_controller.setLooping(true);
_controller.play();
videoWidget = VideoPlayer(_controller);
```

I store this _controller object while starts playing video. When first video completes, I create new videoWidget as shown above and execute setState() to repaint it on UI. Then after I dispose old controller object but it throws "VideoPlayerController was used after being disposed". Ref Code as shown below.

```
if(oldController!=null) {
     oldController.removeListener(() {}); //tried without this also
     await oldController.dispose(); //tried without await also
}
```

How can I solve this issue ?

flutter doctor -v

<details> 
<summary>flutter doctor -v</summary> 

```bash
[√] Flutter (Channel dev, 2.1.0-12.1.pre, on Microsoft Windows [Version 10.0.18363.1016], locale en-CA)
    • Flutter version 2.1.0-12.1.pre at C:\Program Files\flutter
    • Framework revision 8264cb3e8a (3 weeks ago), 2021-03-10 12:37:57 -0800
    • Engine revision 711ab3fda0
    • Dart version 2.13.0 (build 2.13.0-116.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2) 
    • Android SDK at C:\Users\street\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.        
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30621.155
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.53.2)
    • VS Code at C:\Users\street\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.20.0

[√] Connected device (2 available)
    • Mi A1 (mobile)    • 925fe0c00604 • android-arm64 • Android 9 (API 28)
    • Windows (desktop) • windows      • windows-x64   • Microsoft Windows [Version 10.0.18363.1016]

! Doctor found issues in 1 category.
```
	
</details>

Error reference details : 

<details> 
<summary>logs</summary> 

```bash
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═════════════════════════════════════
                    The following assertion was thrown building Positioned(left: 0.0, top: 0.4, width: 170.6, height:
                    643.0):
                    A VideoPlayerController was used after being disposed.
                    Once you have called dispose() on a VideoPlayerController, it can no longer be used.

                    The relevant error-causing widget was:
                      Positioned file:///C:/Users/street/Documents/unoplayer/lib/player/campaignPlayer.dart:75:30

                    When the exception was thrown, this was the stack:
                    #0      ChangeNotifier._debugAssertNotDisposed.<anonymous closure> (package:flutter/src/foundation/change_notifier.dart:117:9)
                    #1      ChangeNotifier._debugAssertNotDisposed (package:flutter/src/foundation/change_notifier.dart:123:6)
                    #2      ChangeNotifier.removeListener (package:flutter/src/foundation/change_notifier.dart:195:12)
                    #3      _VideoPlayerState.deactivate (package:video_player/video_player.dart:649:23)
                    #4      StatefulElement.deactivate (package:flutter/src/widgets/framework.dart:4786:11)
                    #5      _InactiveElements._deactivateRecursively (package:flutter/src/widgets/framework.dart:1862:13)
                    #6      _InactiveElements.add (package:flutter/src/widgets/framework.dart:1876:7)
                    #7      Element.deactivateChild (package:flutter/src/widgets/framework.dart:3639:30)
                    #8      Element.updateChild (package:flutter/src/widgets/framework.dart:3353:9)
                    #9      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #10     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #11     ProxyElement.update (package:flutter/src/widgets/framework.dart:4915:5)
                    #12     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #13     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5579:32)
                    #14     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6181:17)
                    #15     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #16     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #17     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #18     ProxyElement.update (package:flutter/src/widgets/framework.dart:4915:5)
                    #19     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #20     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6057:14)
                    #21     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #22     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #23     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #24     StatelessElement.update (package:flutter/src/widgets/framework.dart:4648:5)
                    #25     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #26     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #27     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #28     StatelessElement.update (package:flutter/src/widgets/framework.dart:4648:5)
                    #29     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #30     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #31     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #32     ProxyElement.update (package:flutter/src/widgets/framework.dart:4915:5)
                    #33     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #34     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #35     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #36     ProxyElement.update (package:flutter/src/widgets/framework.dart:4915:5)
                    #37     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #38     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5579:32)
                    #39     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6181:17)
                    #40     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #41     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #42     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4739:11)
                    #43     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #44     StatefulElement.update (package:flutter/src/widgets/framework.dart:4771:5)
                    #45     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #46     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #47     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #48     ProxyElement.update (package:flutter/src/widgets/framework.dart:4915:5)
                    #49     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #50     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #51     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4739:11)
                    #52     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #53     StatefulElement.update (package:flutter/src/widgets/framework.dart:4771:5)
                    #54     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #55     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6057:14)
                    #56     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #57     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #58     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #59     StatelessElement.update (package:flutter/src/widgets/framework.dart:4648:5)
                    #60     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #61     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6057:14)
                    #62     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #63     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #64     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4739:11)
                    #65     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #66     StatefulElement.update (package:flutter/src/widgets/framework.dart:4771:5)
                    #67     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #68     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #69     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4739:11)
                    #70     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #71     StatefulElement.update (package:flutter/src/widgets/framework.dart:4771:5)
                    #72     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #73     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #74     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #75     ProxyElement.update (package:flutter/src/widgets/framework.dart:4915:5)
                    #76     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #77     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #78     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4739:11)
                    #79     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #80     StatefulElement.update (package:flutter/src/widgets/framework.dart:4771:5)
                    #81     Element.updateChild (package:flutter/src/widgets/framework.dart:3345:15)
                    #82     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4592:16)
                    #83     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4739:11)
                    #84     Element.rebuild (package:flutter/src/widgets/framework.dart:4261:5)
                    #85     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2578:33)
                    #86     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:875:21)
                    #87     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:329:5)
                    #88     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
                    #89     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
                    #90     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)
                    #94     _invoke (dart:ui/hooks.dart:167:10)
                    #95     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
                    #96     _drawFrame (dart:ui/hooks.dart:126:31)
                    (elided 3 frames from dart:async)

                    ════════════════════════════════════════════════════════════════════════
```

</details>