BoxConstraintsAxisUtil extension
Extension on BoxConstraints that provides various axis-dependant utilities.
Methods
-
axisConstraints(
Axis axis) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Returns box constraints with the sameaxis
constraints but with an unconstrained cross axis. -
constrainAxis(
Axis axis, [double extent = double.infinity]) → double -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Returns the value that both satisfies the constraints and is as close as possible to the given extent onaxis
. -
constrainAxisDimensions(
Axis axis, double cross, double main) → Size -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Returns the size that both satisfies the constraints and is as close as possible to the given cross and main size. -
constrainCrossAxis(
Axis axis, [double extent = double.infinity]) → double -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Returns the value that both satisfies the constraints and is as close as possible to the given extent crossingaxis
. -
copyWithAxis(
Axis axis, {double? minCross, double? maxCross, double? minMain, double? maxMain}) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Creates a copy of this box constraints but with the given fields replaced with the new values. -
crossAxisConstraints(
Axis axis) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Returns box constraints with the same cross axis constraints but with an unconstrained main axis. -
hasBoundedAxis(
Axis axis) → bool -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Whether there is an upper bound on the maximum extent of the given axis. -
hasBoundedCrossAxis(
Axis axis) → bool -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Whether there is an upper bound on the maximum extent crossing the given axis. -
hasInfiniteAxis(
Axis axis) → bool -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Whether the constraint for the given axis is infinite. -
hasInfiniteCrossAxis(
Axis axis) → bool -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Whether the constraint crossing the given axis is infinite. -
hasTightAxis(
Axis axis) → bool -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Whether there is exactly one value that satisfies the constraints on the given axis. -
hasTightCrossAxis(
Axis axis) → bool -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Whether there is exactly one value that satisfies the constraints crossing the given axis. -
maxAxis(
Axis axis) → double -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
The maximum value that satisfies the constraints on the given axis. -
maxCrossAxis(
Axis axis) → double -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
The maximum value that satisfies the constraints crossing the given axis. -
minAxis(
Axis axis) → double -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
The minimum value that satisfies the constraints on the given axis. -
minCrossAxis(
Axis axis) → double -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
The minimum value that satisfies the constraints crossing the given axis. -
tightenAxis(
Axis axis, {double? cross, double? main}) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Returns new box constraints with a tight main and/or cross axes.
Static Methods
-
create(
Axis axis, {double minCross = 0.0, double maxCross = double.infinity, double minMain = 0.0, double maxMain = double.infinity}) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Creates box constraints with the given constraints. -
expand(
Axis axis, {double? cross, double? main}) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Creates box constraints that expand to fill another box constraints. -
tightFor(
Axis axis, {double? cross, double? main}) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Creates box constraints that require the given cross or main size. -
tightForFinite(
Axis axis, {double cross = double.infinity, double main = double.infinity}) → BoxConstraints -
Available on BoxConstraints, provided by the BoxConstraintsAxisUtil extension
Creates box constraints that require the given cross or main size, except if they are infinite.