@@ -146,12 +146,6 @@ class _ChewiePlayerState extends State<Chewie> {
}
- @override
- void dispose() {
- _controller.dispose();
- super.dispose();
- }
-
Future<dynamic> _pushFullScreenWidget(BuildContext context) async {
final isAndroid = Theme.of(context).platform == TargetPlatform.android;
final TransitionRoute<Null> route = new PageRouteBuilder<Null>(
@@ -126,6 +126,12 @@ class _VideoPlayerWithControlsState extends State<PlayerWithControls> {
+ @override
+ dispose(){
+ widget.controller.removeListener(_onPlay);
+ super.dispose();
+ }
+
void _onPlay() {
if (widget.controller.value.isPlaying) {
setState(() {