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

fix: UniqueKey does not work for controller tag when building app on release mode in Flutter 3.22 #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TinhHuynh
Copy link

@TinhHuynh TinhHuynh commented Jul 2, 2024

Hi, the PodPlayerController uses UniqueKey().toString() to generate a tag for the internal PodGetXController. However, in Flutter 3.22, there is an issue that UniqueKey always returns "Instance of UniqueKey" in release mode. No matter how many PodPlayerController are created, they still share the same PodGetXController instance.

To address this issue, I've replaced the usage of UniqueKey with Uuid for tag generation in the PodPlayerController class. Uuid is a safer and more standard approach for generating unique identifiers, and it ensures that each PodPlayerController instance will have a unique tag.

This change affects the _init method in the PodPlayerController class, where the getTag variable is assigned. I've tested the changes and confirmed that each PodPlayerController instance now receives a unique PodGetXVideoController instance as expected.

@TinhHuynh TinhHuynh mentioned this pull request Jul 3, 2024
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

Successfully merging this pull request may close these issues.

1 participant