toJson method

Map<String, Object?> toJson()

Unbounded is absent, not Infinity. JSON has no infinity and jsonEncode throws on one, which is not a theoretical corner: an unbounded maxWidth is what most of a real tree is laid out under, so the first entry with a Column in it failed to encode at all.

It was written as an explicit null first, which _in has always read the same way as a missing key. Leaving the key out says the identical thing in sixteen fewer characters, and "maxWidth": null on two axes of every node of a real tree was 8 KB of a 234 KB read.

Implementation

Map<String, Object?> toJson() => {
  'minWidth': ?_out(minWidth),
  'maxWidth': ?_out(maxWidth),
  'minHeight': ?_out(minHeight),
  'maxHeight': ?_out(maxHeight),
};