You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this is spitting out a LateInitializationError
I/flutter (27513): ----------------FIREBASE CRASHLYTICS----------------
I/flutter (27513): LateInitializationError: Field 'mainContext' has not been initialized.
I/flutter (27513): #0 _PodBaseController.mainContext (package:pod_player/src/controllers/pod_base_controller.dart)
I/flutter (27513): #1 _PodVideoController._enableFullScreenView (package:pod_player/src/controllers/pod_video_controller.dart:230:9)
I/flutter (27513): #2 _PodVideoController.enableFullScreen (package:pod_player/src/controllers/pod_video_controller.dart:179:7)
I/flutter (27513):
I/flutter (27513): ----------------------------------------------------
How can I solve this?
The text was updated successfully, but these errors were encountered:
I initialized the controller
late final PodPlayerController fullVideoController;
@override void initState() { super.initState(); fullVideoController = PodPlayerController( playVideoFrom: PlayVideoFrom.youtube('https://youtu.be/$url', videoPlayerOptions: VideoPlayerOptions(allowBackgroundPlayback: true)), podPlayerConfig: const PodPlayerConfig( videoQualityPriority: [1080, 720, 360], autoPlay: true, isLooping: true, wakelockEnabled: true, )) ..initialise(); }
and then when I click a button,
I want it to play in full screen.
ElevatedButton( onPressed: () { fullVideoController.enableFullScreen(); }, style: ElevatedButton.styleFrom( backgroundColor: const Color(0xff00A6CC), visualDensity: VisualDensity.compact, padding: const EdgeInsets.symmetric(horizontal: 10), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)), ), child: Text(tr('play_video'), style: const TextStyle(color: Colors.white)), ),
However, this is spitting out a LateInitializationError
I/flutter (27513): ----------------FIREBASE CRASHLYTICS----------------
I/flutter (27513): LateInitializationError: Field 'mainContext' has not been initialized.
I/flutter (27513): #0 _PodBaseController.mainContext (package:pod_player/src/controllers/pod_base_controller.dart)
I/flutter (27513): #1 _PodVideoController._enableFullScreenView (package:pod_player/src/controllers/pod_video_controller.dart:230:9)
I/flutter (27513): #2 _PodVideoController.enableFullScreen (package:pod_player/src/controllers/pod_video_controller.dart:179:7)
I/flutter (27513):
I/flutter (27513): ----------------------------------------------------
How can I solve this?
The text was updated successfully, but these errors were encountered: