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

Can UnityWidget() work with Hero() component? #937

Open
emileswain opened this issue Mar 12, 2024 · 0 comments
Open

Can UnityWidget() work with Hero() component? #937

emileswain opened this issue Mar 12, 2024 · 0 comments

Comments

@emileswain
Copy link

I'm using UnityWidget() within a Hero(), the idea being to try and persist the Unity view across views within Flutter routes.

It works, sort of, it essentially flickers a lot. I'm wondering if anyone has done something similar and or if its possible to smoothly transition the Unity view across views without the flickering.

return Hero(
      tag: "avatarHero",
      child: Padding(
          padding: const EdgeInsets.only(bottom: 13),
          child: SizedBox(
              width: double.infinity,
              height: 300,
              child: UnityWidget(
                onUnityCreated: _onUnityCreated,
                onUnityMessage: onUnityMessage,
                onUnitySceneLoaded: onUnitySceneLoaded,
                useAndroidViewSurface: true,
                // borderRadius: const BorderRadius.all(Radius.circular(70)),
              ))));
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