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

start double
The distance fraction in the horizontal direction. [...]
final
y double
The distance fraction in the vertical direction. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

add(AlignmentGeometry other) AlignmentGeometry
Returns the sum of two AlignmentGeometry objects. [...]
resolve(TextDirection direction) Alignment
Convert this instance into a Alignment, which uses literal coordinates (the x coordinate being explicitly a distance from the left). [...]
toString() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator %(double other) AlignmentDirectional
Computes the remainder in each dimension by the given factor.
operator *(double other) AlignmentDirectional
Scales the AlignmentDirectional in each dimension by the given factor.
operator +(AlignmentDirectional other) AlignmentDirectional
Returns the sum of two AlignmentDirectionals.
operator -(AlignmentDirectional other) AlignmentDirectional
Returns the difference between two AlignmentDirectionals.
operator /(double other) AlignmentDirectional
Divides the AlignmentDirectional in each dimension by the given factor.
operator unary-() AlignmentDirectional
Returns the negation of the given AlignmentDirectional.
operator ~/(double other) AlignmentDirectional
Integer divides the AlignmentDirectional in each dimension by the given factor.
operator ==(other) bool
The equality operator. [...]
inherited

Static Methods

lerp(AlignmentDirectional a, AlignmentDirectional b, double t) AlignmentDirectional
Linearly interpolate between two AlignmentDirectionals. [...]

Constants

bottomCenter AlignmentDirectional
The center point along the bottom edge. [...]
const AlignmentDirectional(0.0, 1.0)
bottomEnd AlignmentDirectional
The bottom corner on the "end" side.
const AlignmentDirectional(1.0, 1.0)
bottomStart AlignmentDirectional
The bottom corner on the "start" side.
const AlignmentDirectional(-1.0, 1.0)
center AlignmentDirectional
The center point, both horizontally and vertically. [...]
const AlignmentDirectional(0.0, 0.0)
centerEnd AlignmentDirectional
The center point along the "end" edge.
const AlignmentDirectional(1.0, 0.0)
centerStart AlignmentDirectional
The center point along the "start" edge.
const AlignmentDirectional(-1.0, 0.0)
topCenter AlignmentDirectional
The center point along the top edge. [...]
const AlignmentDirectional(0.0, -1.0)
topEnd AlignmentDirectional
The top corner on the "end" side.
const AlignmentDirectional(1.0, -1.0)
topStart AlignmentDirectional
The top corner on the "start" side.
const AlignmentDirectional(-1.0, -1.0)