getBoxConstraints method
Implementation
BoxConstraints? getBoxConstraints(Map? spec) {
if (spec == null ||
(spec["minWidth"] == null &&
spec["maxWidth"] == null &&
spec["minHeight"] == null &&
spec["maxHeight"] == null)) {
return null;
}
return BoxConstraints(
minWidth: parseDouble(spec["minWidth"], defaultValue: 0),
maxWidth: parseDouble(spec["maxWidth"], defaultValue: double.infinity),
minHeight: parseDouble(spec["minHeight"], defaultValue: 0),
maxHeight: parseDouble(spec["maxHeight"], defaultValue: double.infinity),
);
}