alignment property

AlignmentGeometry? alignment
final

How to align the animation within its bounds.

The alignment aligns the given position in the animation to the given position in the layout bounds. For example, an Alignment alignment of (-1.0, -1.0) aligns the animation to the top-left corner of its layout bounds, while an Alignment alignment of (1.0, 1.0) aligns the bottom right of the animation with the bottom right corner of its layout bounds. Similarly, an alignment of (0.0, 1.0) aligns the bottom middle of the animation with the middle of the bottom edge of its layout bounds.

To display a subpart of an animation, consider using a CustomPainter and Canvas.drawImageRect.

If the alignment is TextDirection-dependent (i.e. if it is a AlignmentDirectional), then an ambient Directionality widget must be in scope.

Defaults to Alignment.center.

See also:

Implementation

final AlignmentGeometry? alignment;