AlignmentDirectional class Null safety
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 non-existent 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.
AlignmentDirectional(0.0, 1.0)
- bottomEnd → const AlignmentDirectional
-
The bottom corner on the "end" side.
AlignmentDirectional(1.0, 1.0)
- bottomStart → const AlignmentDirectional
-
The bottom corner on the "start" side.
AlignmentDirectional(-1.0, 1.0)
- center → const AlignmentDirectional
-
The center point, both horizontally and vertically.
AlignmentDirectional(0.0, 0.0)
- centerEnd → const AlignmentDirectional
-
The center point along the "end" edge.
AlignmentDirectional(1.0, 0.0)
- centerStart → const AlignmentDirectional
-
The center point along the "start" edge.
AlignmentDirectional(-1.0, 0.0)
- topCenter → const AlignmentDirectional
-
The center point along the top edge.
AlignmentDirectional(0.0, -1.0)
- topEnd → const AlignmentDirectional
-
The top corner on the "end" side.
AlignmentDirectional(1.0, -1.0)
- topStart → const AlignmentDirectional
-
The top corner on the "start" side.
AlignmentDirectional(-1.0, -1.0)