Youtube_player_flutter: [BUG] YoutubePlayerController was used after being disposed.

Created on 11 Nov 2019  ยท  3Comments  ยท  Source: sarbagyastha/youtube_player_flutter

Describe the bug
When i use live broadcast function on YoutubePlayerController, and pop to the previous page.

Navigator.of(context).pop();

Error

โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by widgets library โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
The following assertion was thrown while finalizing the widget tree:
A YoutubePlayerController was used after being disposed.

Once you have called dispose() on a YoutubePlayerController, it can no longer be used.
When the exception was thrown, this was the stack
#0      ChangeNotifier._debugAssertNotDisposed.<anonymous closure> 
package:flutter/โ€ฆ/foundation/change_notifier.dart:105
#1      ChangeNotifier._debugAssertNotDisposed 
package:flutter/โ€ฆ/foundation/change_notifier.dart:111
#2      ChangeNotifier.removeListener 
package:flutter/โ€ฆ/foundation/change_notifier.dart:166
#3      _PlayPauseButtonState.dispose 
package:youtube_player_flutter/โ€ฆ/widgets/play_pause_button.dart:60
#4      StatefulElement.unmount 
package:flutter/โ€ฆ/widgets/framework.dart:4142
...
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
bug fixed

All 3 comments

@HiIamAlanOu Will publish with fix tonight.

Thank u.

Fixed in Version 6.0.1

Was this page helpful?
0 / 5 - 0 ratings