Many Windows programs allow you to reduce the window size up to a certain size. However, when I create a new project in Flutter, the window can be shrunk without any restrictions, so that nothing of the content is visible anymore. Is there any way to set this minimum size?
Until now I have done some unsuccessful research on the internet. The only thing I have managed to do is to read the current window size and then display a message if the window is too small instead of the actual window content. This is better than nothing, but still not what I want to do.
A
Container()
widget has a parameter calledconstraints
. With that you can set minimum and maximum sizes.You may also use a
ConstrainedBox()
widget instead of aContainer()
.