PrinterConstraints class

Constructors

PrinterConstraints({double minWidth = 0.0, double maxWidth = double.infinity, double minHeight = 0.0, double maxHeight = double.infinity})
Creates box constraints with the given constraints.
const
PrinterConstraints.constraints(PrinterConstraints parentConstraints, PrinterSize size)
PrinterConstraints.expand({double? width, double? height})
Creates box constraints that expand to fill another box constraints.
const
PrinterConstraints.loose(PrinterSize size)
Creates box constraints that forbid sizes larger than the given size.
PrinterConstraints.tight(PrinterSize size)
Creates box constraints that is respected only by the given size.
PrinterConstraints.tightFor({double? width, double? height})
Creates box constraints that require the given width or height.
const
PrinterConstraints.tightForFinite({double width = double.infinity, double height = double.infinity})
Creates box constraints that require the given width or height, except if they are infinite.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maxHeight double
The maximum height that satisfies the constraints.
final
maxWidth double
The maximum width that satisfies the constraints.
final
minHeight double
The minimum height that satisfies the constraints.
final
minWidth double
The minimum width that satisfies the constraints.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

constrain(PrinterSize size) PrinterSize
Returns the size that both satisfies the constraints and is as close as possible to the given size.
constrainHeight([double height = double.infinity]) double
Returns the height that both satisfies the constraints and is as close as possible to the given height.
constrainWidth([double width = double.infinity]) double
Returns the width that both satisfies the constraints and is as close as possible to the given width.
copyWith({double? minWidth, double? maxWidth, double? minHeight, double? maxHeight}) PrinterConstraints
Creates a copy of this box constraints but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited