-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Godot View does not respect layout in flutter android app and always sticks to the top of the screen #11
Comments
I watched the tutorials, but when attempting to run the project in Godot 4.2.1, I encountered difficulties similar to what you demonstrated. However, upon invoking the Godot Screen, the application abruptly halts and shuts down the emulator. Below is the error output: Launching lib\main.dart on sdk gphone64 x86 64 in debug mode... Exited. |
You can follow this, of course it has the same issue highlighted but the original author but I think you should try running it on a real device and not emulator |
I am trying to embed Godot view in my flutter android app. Here is the complete source code
Flutter allows embedding native views. Check here for more info
I am able to embed my
godot
view properly in myflutter
app, but the issue is it always sticks at the top and hide otherflutter
contents.Check below video to know what i am talking about
Screen.Recording.2023-12-08.at.8.43.34.AM.mov
As you can see in the video, first i had two
flutter Text
at the top and at the bottom. Once theGodot
view loads it completely occupies the First text, there is aPositioned
widget from flutter as well which is kind of likeposition: absolute
property fromcss
and theGodot
view does not respect that as well. Also if you check my code i have specifically set the size of my framelayout which also does not work and the Godot view occupies the entire height of 1200 which i had set in my Godot project. The same thing works in Jetpack compose by setting framelayout height manually.Here is a snippet of my code
My native view in flutter
To use it in flutter i use something like this
The column widget in flutter helps to layout views on below the other which the Godot view does not respect. I have created multiple platforms views previously for android using flutter and have never faced such problem. This seems like a Godot issue to me than a flutter issue. Correct me if i am wrong
The text was updated successfully, but these errors were encountered: