Align

This widget motivated by Align in Flutter.

A widget that aligns its child within itself and optionally sizes itself based on the child’s size.

For example, to align a box at the bottom right, you would pass this box a tight constraint that is bigger than the child’s natural size, with an alignment of Alignment.bottomRight. This widget will be as big as possible if its dimensions are constrained and widthFactor and heightFactor are null. If a dimension is unconstrained and the corresponding size factor is null then the widget will match its child’s size in that dimension. If a size factor is non-null then the corresponding dimension of this widget will be the product of the child’s dimension and the size factor. For example if widthFactor is 2.0 then the width of this widget will always be twice its child’s width.

See: https://api.flutter.dev/flutter/widgets/Align-class.html

Props

alignment

Value: Alignment (default: Alignment.center)

widthFactor

Value: number | undefined

heightFoctor

Value: number | undefined

child

Value: Widget | undefined

Examples

Basic