PrinterConstraints.tightFor constructor

const PrinterConstraints.tightFor({
  1. double? width,
  2. double? height,
})

Creates box constraints that require the given width or height.

See also:

  • new PrinterConstraints.tightForFinite, which is similar but instead of being tight if the value is non-null, is tight if the value is not infinite.

Implementation

const PrinterConstraints.tightFor({
  double? width,
  double? height,
}) : minWidth = width ?? 0.0,
     maxWidth = width ?? double.infinity,
     minHeight = height ?? 0.0,
     maxHeight = height ?? double.infinity;