BoxConstraints class Null safety

Annotations

Constructors

BoxConstraints({double minWidth = 0.0, double maxWidth = double.infinity, double minHeight = 0.0, double maxHeight = double.infinity})
Creates box constraints with the given constraints.
const
BoxConstraints.expand({double? width, double? height})
Creates box constraints that expand to fill another box constraints.
const
BoxConstraints.tight(PdfPoint size)
Creates box constraints that is respected only by the given size.
BoxConstraints.tightFor({double? width, double? height})
Creates box constraints that require the given width or height.
const
BoxConstraints.tightForFinite({double width = double.infinity, double height = double.infinity})
const

Properties

biggest PdfPoint
The biggest size that satisfies the constraints.
read-only
hasBoundedHeight bool
read-only
hasBoundedWidth bool
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
hasInfiniteHeight bool
read-only
hasInfiniteWidth bool
read-only
hasTightHeight bool
Whether there is exactly one height value that satisfies the constraints.
read-only
hasTightWidth bool
Whether there is exactly one width value that satisfies the constraints.
read-only
isTight bool
Whether there is exactly one size that satisfies the constraints.
read-only
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.
read-only, inherited
smallest PdfPoint
The smallest size that satisfies the constraints.
read-only

Methods

constrain(PdfPoint size) PdfPoint
constrainHeight([double height = double.infinity]) double
constrainRect({double width = double.infinity, double height = double.infinity}) PdfRect
constrainSizeAndAttemptToPreserveAspectRatio(PdfPoint size) PdfPoint
Returns a size that attempts to meet the conditions
constrainWidth([double width = double.infinity]) double
copyWith({double? minWidth, double? maxWidth, double? minHeight, double? maxHeight}) BoxConstraints
deflate(EdgeInsets edges) BoxConstraints
Returns new box constraints that are smaller by the given edge dimensions.
enforce(BoxConstraints constraints) BoxConstraints
Returns new box constraints that respect the given constraints while being as close as possible to the original constraints.
loosen() BoxConstraints
Returns new box constraints that remove the minimum width and height requirements.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
tighten({double? width, double? height}) BoxConstraints
Returns new box constraints with a tight width and/or height as close to the given width and height as possible while still respecting the original box constraints.
toString() String
A string representation of this object. [...]
override

Operators

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