bitsdojo / bitsdojo_window

A Flutter package that makes it easy to customize and work with your Flutter desktop app window.
http://www.youtube.com/watch?v=bee2AHQpGK4
MIT License
815 stars 229 forks source link

Set window size to widget size. #152

Closed bradleybauer closed 2 years ago

bradleybauer commented 2 years ago

Is it possible to set the window size to be the size of my main content widget? I am using a fork of bitsdojo_window to remove the system titlebar and border. My main content is resizable (collapsible and expandable lists). I think it would look great if my app window resized with the content. Can this be done with a plugin?

appinteractive commented 2 years ago

Can't you just set the window size to the widget size? There are widgets that give you the size on change, there you could update the window size.

For example: https://pub.dev/packages/measure_size

bradleybauer commented 2 years ago

Yeah that does work. TBH I did not look into this very much before submitting the issue.

measure_size does not trigger it's callback when I expect it to. But I can work around that.