BoxConstraints.tightFor constructor
Tight on the axes that are specified (same idea as Flutter / package:pdf).
Implementation
factory BoxConstraints.tightFor({double? width, double? height}) {
return BoxConstraints(
minWidth: width ?? 0,
maxWidth: width ?? double.infinity,
minHeight: height ?? 0,
maxHeight: height ?? double.infinity,
);
}