SizeMinContent class
A size unit that sizes to the minimum intrinsic size of the content.
This size unit evaluates the minimum width or height that the child needs based on its content, without allowing it to shrink smaller than necessary. It's useful for creating content-driven layouts where elements should be as small as possible while still displaying their content properly.
- Inheritance
- Available extensions
Constructors
- SizeMinContent()
-
Creates a min-content size unit.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clamp(
{SizeUnit min = const SizeFixed(0), SizeUnit max = const SizeFixed(double.infinity)}) → SizeUnit -
Available on SizeUnit, provided by the SizeUnitExtension extension
Constrains this size unit within the specified min and max bounds. -
computeSize(
{required ParentLayout parent, required ChildLayout child, required LayoutHandle< Layout> layoutHandle, required LayoutAxis axis, required LayoutSize contentSize, required LayoutSize viewportSize}) → double -
Returns the minimum intrinsic size of the child along the specified axis.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCodeString(
) → String -
Converts the size unit to a code string representation.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
Object other) → SizeUnit -
Available on SizeUnit, provided by the SizeUnitExtension extension
Multiplies two size units. -
operator +(
SizeUnit other) → SizeUnit -
Available on SizeUnit, provided by the SizeUnitExtension extension
Adds two size units together. -
operator -(
SizeUnit other) → SizeUnit -
Available on SizeUnit, provided by the SizeUnitExtension extension
Subtracts one size unit from another. -
operator /(
SizeUnit other) → SizeUnit -
Available on SizeUnit, provided by the SizeUnitExtension extension
Divides one size unit by another. -
operator ==(
Object other) → bool -
The equality operator.
override
-
operator unary-(
) → SizeUnit -
Available on SizeUnit, provided by the SizeUnitExtension extension
Negates this size unit (equivalent to 0 - this).