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

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. [...]
override
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
Returns a string representation of this object.
override
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.
override
operator *(double other) AlignmentDirectional
Scales the AlignmentDirectional in each dimension by the given factor.
override
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.
override
operator unary-() AlignmentDirectional
Returns the negation of the given AlignmentDirectional.
override
operator ~/(double other) AlignmentDirectional
Integer divides the AlignmentDirectional in each dimension by the given factor.
override
operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Methods

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

Constants

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