defaultChildFits function

String? defaultChildFits(
  1. Node parent,
  2. SizeFit fit,
  3. bool horizontal
)

Most parents (stacks, screens' slots...): no Flexible; no Fill along an axis the parent scrolls.

Implementation

String? defaultChildFits(Node parent, SizeFit fit, bool horizontal) => switch (fit) {
      SizeFit.flexible => _flexOnly,
      SizeFit.fill when _scrollsAlong(parent, horizontal) =>
        "The parent scrolls ${horizontal ? 'horizontally' : 'vertically'}: its content has no end to fill to.",
      _ => null,
    };