flutter-unity-view-widget
flutter-unity-view-widget copied to clipboard
Can UnityWidget() work with Hero() component?
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)),
))));