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

Properties

PropertyTypeDescription
alignmentStacAlignmentHow to align the non-positioned and partially-positioned children. Defaults to StacAlignment.topStart.
clipBehaviorStacClipHow to clip the content. Defaults to StacClip.hardEdge.
fitStacStackFitHow to size the non-positioned children. Defaults to StacStackFit.loose.
textDirectionStacTextDirectionThe text direction to use for resolving alignment.
childrenList<StacWidget>The list of widgets to display inside the stack. Defaults to an empty list.

Example

StacStack(
  alignment: StacAlignment.center,
  clipBehavior: StacClip.antiAlias,
  fit: StacStackFit.expand,
  textDirection: StacTextDirection.ltr,
  children: [
    StacText(data: 'Hello, World!'),
    StacContainer(width: 100, height: 100, color: StacColors.red),
  ],
)