An issue with the player on 0.7.2 .. "the method was called on null" #7
Description
After updating the player to V.0.7.2 the app would show me an error on the screen.
"NosuchMethodError: The method 'call' was called on null.
I/flutter ( 5688): Receiver: null
I/flutter ( 5688): Tried calling: call(Instance of 'YoutubePlayerController')"
And on the Debug console
"
I/flutter ( 5688): #397 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.attachRootWidget package:flutter/…/widgets/binding.dart:712 I/flutter ( 5688): #398 runApp package:flutter/…/widgets/binding.dart:756 I/flutter ( 5688): #399 main package:yt_demo/main.dart:6 I/flutter ( 5688): #400 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:289:19) I/flutter ( 5688): #401 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12) I/flutter ( 5688): ════════════════════════════════════════════════════════════════════════════════════════════════════
"
it looks like the error is caused by this line in the youtube_player.dart (
widget.callbackController(_youtubePlayerControllerController);
Line: 820
).
After i comment the line the error goes away but the player and the app in general start to behave in a weird way.. for instance. the player won't dispose when i leave the current page and the video would take alot of time to start.
Hope you can fix this issue.
P.S. i have updated directly from 0.6.1 to 0.7.2 .. by changing the plugin number in "pubspec.yaml" and right after that it started to show me this error.