LayoutConstraints.tight constructor

const LayoutConstraints.tight(
  1. Vector2 size
)

Exactly size in both axes. Aliases size rather than copying, so it must already be immutable - this is checked with an assertion. Copy a mutable size with Vector2.copy first if needed.

Implementation

const LayoutConstraints.tight(Vector2 size)
  : assert(
      size is! MVector2,
      'size must be immutable. '
      'Copy it with Vector2.copy first.',
    ),
    min = size,
    max = size;