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
-
- Object
- AlignmentGeometry
- AlignmentDirectional
Constructors
- AlignmentDirectional(double start, double y)
-
Creates a directional alignment.
const
Properties
Methods
-
add(
AlignmentGeometry other) → AlignmentGeometry -
Returns the sum of two AlignmentGeometry objects.
override
-
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 %(
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 ==(
Object other) → bool -
The equality operator.
inherited
-
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
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.
- 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.