Skip to content
masterclass Buddy

Flutter & Dart · Component

Stack

Stack places widgets on top of each other. Use Positioned for edge-based placement, such as putting a label over an image.

Last updated

Syntax

Stack({Key? key, AlignmentGeometry alignment = AlignmentDirectional.topStart, TextDirection? textDirection, StackFit fit = StackFit.loose, Clip clipBehavior = Clip.hardEdge, List<Widget> children = const <Widget>[]})

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Positioned
  • Align
  • IndexedStack
  • CustomSingleChildLayout
  • CustomMultiChildLayout
  • Flow
  • RenderStack

Source: Stack class - widgets library - Dart API description. Checked 2026-11-03.