fluttercommunity / fluttercommunity/chewie

A VideoPlayerController was used after being disposed in ListView.builder()

Open
#276 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
1.1k
Avg merge
6d 8h
Merged PRs (30d)
6

Description

Hi, I have a facebook like feed in my app which displays a list of cards composed of different content types text, images and videos. I'm using Chewie widget to display videos.

The issue is whenever I scroll past a few items from the video widget in the ListView, the VideoController gets disposed and scrolling back to the same item throws the exception

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

I have read that one solution is to increase `cacheExtent` on my ListView to avoid disposal of VideoController but that might not work since the items in my ListView will continue to grow as the user scrolls down.

Can anyone help me with a better solution?

Thanks a lot!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.