Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]The method 'addListener' was called on null. #146

Closed
mubaraknet opened this issue Jan 29, 2020 · 1 comment
Closed

[BUG]The method 'addListener' was called on null. #146

mubaraknet opened this issue Jan 29, 2020 · 1 comment
Assignees
Labels

Comments

@mubaraknet
Copy link

Getting the below error from initState()
@OverRide
void initState(){
super.initState();
_initVideo();
_initPlayer();
}

flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following NoSuchMethodError was thrown building _BodyBuilder:
flutter: The method 'addListener' was called on null.
flutter: Receiver: null
flutter: Tried calling: addListener(Closure: () => void from Function 'listener':.)
flutter:
flutter: The relevant error-causing widget was:
flutter: Scaffold file:///Users/zade/Inkers/sinai/sinai/lib/screens/liveStream.dart:50:12
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
flutter: #1 _YoutubePlayerState.initState (package:youtube_player_flutter/src/player/youtube_player.dart:200:37)
flutter: #2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4355:58)
flutter: #3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
flutter: #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)

@mubaraknet mubaraknet added the bug Something isn't working label Jan 29, 2020
@sarbagyastha
Copy link
Owner

You need to pass the controller in YoutubePlayer widget.

@sarbagyastha sarbagyastha added fixed and removed bug Something isn't working labels Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants