AlignmentDirectional class

An offset that's expressed as a fraction of a Size, but whose horizontal component is dependent on the writing direction.

This can be used to indicate an offset from the left in TextDirection.ltr text and an offset from the right in TextDirection.rtl text without having to be aware of the current text direction.

See also:

  • Alignment, a variant that is defined in physical terms (i.e. whose horizontal component does not depend on the text direction).
Inheritance

Constructors

AlignmentDirectional(double start, double y)
Creates a directional alignment.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start double
The distance fraction in the horizontal direction.
final
y double
The distance fraction in the vertical direction.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(TextDirection? direction) Alignment
Convert this instance into an Alignment, which uses literal coordinates (the x coordinate being explicitly a distance from the left).
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

bottomCenter → const AlignmentDirectional
The center point along the bottom edge.
bottomEnd → const AlignmentDirectional
The bottom corner on the "end" side.
bottomStart → const AlignmentDirectional
The bottom corner on the "start" side.
center → const AlignmentDirectional
The center point, both horizontally and vertically.
centerEnd → const AlignmentDirectional
The center point along the "end" edge.
centerStart → const AlignmentDirectional
The center point along the "start" edge.
topCenter → const AlignmentDirectional
The center point along the top edge.
topEnd → const AlignmentDirectional
The top corner on the "end" side.
topStart → const AlignmentDirectional
The top corner on the "start" side.