Creates a box that limits its size only when it's unconstrained.
The maxWidth and maxHeight arguments must not be null and must not be negative.
Source
LimitedBox({
Key key,
this.maxWidth: double.INFINITY,
this.maxHeight: double.INFINITY,
Widget child
}) : super(key: key, child: child) {
assert(maxWidth != null && maxWidth >= 0.0);
assert(maxHeight != null && maxHeight >= 0.0);
}