Skip to content

short flickering between the videos #8

@desmeit

Description

@desmeit

I try to adjust your code to a version with provider.
Unfortunately I get a short flickering between the videos.

  return videoService != null && videoService!.focusedIndex == index
                  ? VideoWidget(
                      isLoading: _isLoading,
                      controller: videoService!.controllers[index]!,
                    )
                  : Container(color: Colors.yellow);
Bildschirmaufnahme.2023-06-30.um.12.15.04.mov

if I remove the videoService!.focusedIndex == index then it is working smoothless but then I have a dispose issue.
As I understand the Container (or the empty Sizebox in your code) appears as long as the focusedIndex is not the index.
Then you always have this short interruption between the videos, regardless of the loading of the video? how can I prevent this flicker between the videos?
maybe it is possible not to check for focusedIndex and dispose all controllers together at the end?

I have an additional question: Why did you put the createIsolate function in the main file? can't you call it in the preload_bloc file?
Is it important to do it in the main file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions