Align class

Combined alignment for both horizontal and vertical positioning.

This class provides a unified way to specify both horizontal and vertical alignment, similar to lipgloss's Position type.

final align = Align(HorizontalAlign.center, VerticalAlign.top);

// Or use presets
final centered = Align.center;
final topLeft = Align.topLeft;

Constructors

Align(HorizontalAlign horizontal, VerticalAlign vertical)
Creates an alignment with the specified horizontal and vertical values.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
horizontal → HorizontalAlign
Horizontal alignment.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
vertical → VerticalAlign
Vertical alignment.
final

Methods

copyWith({HorizontalAlign? horizontal, VerticalAlign? vertical}) → Align
Creates a copy with the specified values replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

bottom → const Align
Alias for bottomCenter.
bottomCenter → const Align
Bottom-center alignment.
bottomLeft → const Align
Bottom-left alignment.
bottomRight → const Align
Bottom-right alignment.
center → const Align
Center alignment (both horizontal and vertical).
centerLeft → const Align
Center-left alignment.
centerRight → const Align
Center-right alignment.
left → const Align
Alias for topLeft.
Alias for topRight.
top → const Align
Alias for topCenter.
topCenter → const Align
Top-center alignment.
topLeft → const Align
Top-left alignment.
topRight → const Align
Top-right alignment.