I have a Container
that should take all available space, but not more than 500 x 500.
If I put it inside of Flexible or Expanded it will grow to take all the screen. Is there in Flutter something similar to android:maxWidth?
I have a Container
that should take all available space, but not more than 500 x 500.
If I put it inside of Flexible or Expanded it will grow to take all the screen. Is there in Flutter something similar to android:maxWidth?
You can use BoxConstraints
,
Container(
constraints: BoxConstraints(
maxHeight: 500.0,
maxWidth: 500.0,
minHeight: 100.0,
minWidth: 100.0),
child: YourChild(),
)
More info: https://docs.flutter.io/flutter/rendering/BoxConstraints-class.html