LayoutConstraints.tight constructor

LayoutConstraints.tight(
  1. LayoutSize size
)

Creates tight constraints that exactly match the given size.

Both min and max constraints are set to the size's dimensions, forcing the element to be exactly that size.

Implementation

LayoutConstraints.tight(LayoutSize size)
  : minWidth = size.width,
    maxWidth = size.width,
    minHeight = size.height,
    maxHeight = size.height;