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

A VideoPlayerController was used after being disposed. Once you have called dispose() on a VideoPlayerController, it can no longer be used. #299

Open
sabahsayedk2000 opened this issue Dec 10, 2024 · 0 comments

Comments

@sabahsayedk2000
Copy link

void initState() {
super.initState();
_razorpay = Razorpay();
_razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, handlePaymentSucces);
_razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, handlePaymentError);
_razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, handleExternalWallet);

coursePrice = widget.courseModel.ogprice + '00';
coursename = widget.courseModel.coursename;
username = userModel!.name;
docidcourse = widget.courseModel.docid;

flickManager = FlickManager(
  videoPlayerController:
  VideoPlayerController.networkUrl(Uri.parse("${widget.courseModel.demovideolink.toString()}")),
  autoPlay: false, // Start playing as soon as the video loads
);

} @OverRide
void dispose() {
// Ensure proper disposal of resources
flickManager.dispose();
_razorpay.clear();
// flickManager.flickVideoManager?.videoPlayerController?.dispose();

super.dispose();

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant