BoxValueConstraints<T> class
- Inheritance
-
- Object
- Constraints
- BoxConstraints
- BoxValueConstraints
Constructors
- BoxValueConstraints({required T value, required BoxConstraints constraints})
Properties
- biggest → Size
-
The biggest size that satisfies the constraints.
no setterinherited
- flipped → BoxConstraints
-
A box constraints with the width and height constraints flipped.
no setterinherited
- hasBoundedHeight → bool
-
Whether there is an upper bound on the maximum height.
no setterinherited
- hasBoundedWidth → bool
-
Whether there is an upper bound on the maximum width.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasInfiniteHeight → bool
-
Whether the height constraint is infinite.
no setterinherited
- hasInfiniteWidth → bool
-
Whether the width constraint is infinite.
no setterinherited
- hasTightHeight → bool
-
Whether there is exactly one height value that satisfies the constraints.
no setterinherited
- hasTightWidth → bool
-
Whether there is exactly one width value that satisfies the constraints.
no setterinherited
- isNormalized → bool
-
Returns whether the object's constraints are normalized.
Constraints are normalized if the minimums are less than or
equal to the corresponding maximums.
no setterinherited
- isTight → bool
-
Whether there is exactly one size that satisfies the constraints.
no setterinherited
- maxHeight → double
-
The maximum height that satisfies the constraints.
finalinherited
- maxWidth → double
-
The maximum width that satisfies the constraints.
finalinherited
- minHeight → double
-
The minimum height that satisfies the constraints.
finalinherited
- minWidth → double
-
The minimum width that satisfies the constraints.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- smallest → Size
-
The smallest size that satisfies the constraints.
no setterinherited
- value → T
-
final
Methods
-
constrain(
Size size) → Size -
Returns the size that both satisfies the constraints and is as close as
possible to the given size.
inherited
-
constrainDimensions(
double width, double height) → Size -
Returns the size that both satisfies the constraints and is as close as
possible to the given width and height.
inherited
-
constrainHeight(
[double height = double.infinity]) → double -
Returns the height that both satisfies the constraints and is as close as
possible to the given height.
inherited
-
constrainSizeAndAttemptToPreserveAspectRatio(
Size size) → Size -
Returns a size that attempts to meet the following conditions, in order:
inherited
-
constrainWidth(
[double width = double.infinity]) → double -
Returns the width that both satisfies the constraints and is as close as
possible to the given width.
inherited
-
copyWith(
{double? minWidth, double? maxWidth, double? minHeight, double? maxHeight}) → BoxConstraints -
Creates a copy of this box constraints but with the given fields replaced with the new values.
inherited
-
debugAssertIsValid(
{bool isAppliedConstraint = false, InformationCollector? informationCollector}) → bool -
Asserts that the constraints are valid.
inherited
-
deflate(
EdgeInsetsGeometry edges) → BoxConstraints -
Returns new box constraints that are smaller by the given edge dimensions.
inherited
-
enforce(
BoxConstraints constraints) → BoxConstraints -
Returns new box constraints that respect the given constraints while being
as close as possible to the original constraints.
inherited
-
heightConstraints(
) → BoxConstraints -
Returns box constraints with the same height constraints but with
unconstrained width.
inherited
-
isSatisfiedBy(
Size size) → bool -
Whether the given size satisfies the constraints.
inherited
-
loosen(
) → BoxConstraints -
Returns new box constraints that remove the minimum width and height requirements.
inherited
-
normalize(
) → BoxConstraints -
Returns a box constraints that isNormalized.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
widthConstraints(
) → BoxConstraints -
Returns box constraints with the same width constraints but with
unconstrained height.
inherited
Operators
-
operator %(
double value) → BoxConstraints -
Computes the remainder of each constraint parameter by the given value.
inherited
-
operator *(
double factor) → BoxConstraints -
Scales each constraint parameter by the given factor.
inherited
-
operator /(
double factor) → BoxConstraints -
Scales each constraint parameter by the inverse of the given factor.
inherited
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator ~/(
double factor) → BoxConstraints -
Scales each constraint parameter by the inverse of the given factor, rounded to the nearest integer.
inherited