toBoxConstraints property

BoxConstraints? get toBoxConstraints

生成目标 BoxConstraints 约束对象

Implementation

BoxConstraints? get toBoxConstraints {
  return (width != null || height != null)
      ? constraints?.tighten(width: width, height: height) ??
            BoxConstraints.tightFor(width: width, height: height)
      : constraints;
}