Hi folks,
how do I set minimum size of my compose windows?
I’m able to set the initial value,
but being the windows resizable, I would like to set a lower value for it to avoid screw everything out!
Well, I had a quick look and didn’t really find nothing that fits my needs.
There is a way to read current windows size
LaunchedEffect(state) {
snapshotFlow { state.size }
.onEach(::onWindowResize)
.launchIn(this)
private fun onWindowResize(size: WindowSize) {
println("onWindowResize $size")
}
but then…
how to stop (don’t allow) to windows be resized only if some condition are matched?
My Goal ideally would be:
• Compose start (at minimum size possible)
• Allow resize only to higher value
• Allow future resize down but only until “minimum values” are reached again