Align class

Positions its child within itself according to alignment.

For example, Align(alignment: Alignment.center, child: Text('hello')) centers the child within the Align widget's bounds.

Inheritance

Constructors

Align({Key? key, required Alignment alignment, Widget? child})
Creates an Align widget with the given alignment.
const

Properties

alignment Alignment
The alignment determining the child's position within this widget.
final
child Widget?
The optional child widget.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() SingleChildRenderObjectElement
Creates the Element for this widget.
inherited
createRenderObject(BuildContext context) RenderAlign
Creates the RenderObject for this widget.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateRenderObject(BuildContext context, covariant RenderAlign renderObject) → void
Updates the renderObject to reflect the current widget configuration.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited