Skip to main content
The Stac Align allows you to build a Flutter Align widget using JSON. To know more about the align widget in Flutter, refer to the official documentation.

Properties

PropertyTypeDescription
alignmentStacAlignmentHow to align the child.
widthFactordoubleIf non-null, sets its width to the child’s width multiplied by this factor.
heightFactordoubleIf non-null, sets its height to the child’s height multiplied by this factor.
childStacWidgetThe widget below this widget in the tree.

Example

StacAlign(
  alignment: StacAlignment.topEnd,
  child: StacContainer(
    color: '#FC5632',
    clipBehavior: StacClip.hardEdge,
    height: 250,
    width: 200,
    child: StacAlign(
      alignment: StacAlignment.bottomCenter,
      child: StacText(
        data: 'Flutter',
        style: StacTextStyle(
          fontSize: 23,
          fontWeight: StacFontWeight.w600,
        ),
      ),
    ),
  ),
)