juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.09k stars 505 forks source link

How to solve RenderAndroidView object was given an infinite size during layout. ? #879

Open neilshih7768 opened 9 months ago

neilshih7768 commented 9 months ago

This is my code : body: SafeArea( child: Stack( //fit: StackFit.expand, children: [ Positioned( top: AppBar().preferredSize.height, child: Offstage( offstage: !bShowUnityBG, child: UnityWidget( onUnityCreated: onUnityCreated, onUnityMessage: onUnityMessage, onUnitySceneLoaded: onUnitySceneLoaded, //fullscreen: false, ), ), ), I want to use top: AppBar().preferredSize.height, to show the status bar and let UnityWidget be the background. But I can't adjust the height of Wiget and keep top distance.