DirectionalEdgeSpacing class
Defines directional spacing values for the edges of a rectangle.
This class uses start/end instead of left/right, making it text-direction aware. The spacing automatically adapts based on whether the text direction is LTR or RTL.
Use this for spacing that should respect text direction, such as margins or padding that need to align with reading direction.
- Inheritance
-
- Object
- EdgeSpacingGeometry
- DirectionalEdgeSpacing
Constructors
- DirectionalEdgeSpacing.all(SpacingUnit value)
-
Creates a DirectionalEdgeSpacing with the same value for all edges.
const
- DirectionalEdgeSpacing.only({SpacingUnit start = SpacingUnit.zero, SpacingUnit top = SpacingUnit.zero, SpacingUnit end = SpacingUnit.zero, SpacingUnit bottom = SpacingUnit.zero})
-
Creates a DirectionalEdgeSpacing with individual directional values.
const
- DirectionalEdgeSpacing.symmetric({SpacingUnit horizontal = SpacingUnit.zero, SpacingUnit vertical = SpacingUnit.zero})
-
Creates a DirectionalEdgeSpacing with symmetric horizontal and vertical values.
const
Properties
- bottom → SpacingUnit
-
The spacing from the bottom edge.
finalinherited
- end → SpacingUnit
-
The spacing from the end edge (right in LTR, left in RTL).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → SpacingUnit
-
The spacing from the start edge (left in LTR, right in RTL).
final
- top → SpacingUnit
-
The spacing from the top edge.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
LayoutTextDirection direction) → EdgeSpacing -
Resolves directional spacing to absolute spacing based on text direction.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited