Stack is useful when elements overlap: a label over an image, a badge over an icon or controls over a game area. It is not a replacement for every row and column in a responsive layout.
Give the stack a meaningful size
Positioned describes distances from edges of the stack. A bounded region makes those distances predictable. For ordinary documents, let text flow through rows, columns and scrollable lists instead of manually calculating every position.
Worked example
This is a complete example. Open it with Run example, then use Run inside DartPad.
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Layered content')),
body: Center(child: SizedBox(width: 280, height: 180,
child: Stack(children: [
Positioned.fill(child: ColoredBox(color: Colors.blue.shade50)),
const Center(child: Icon(Icons.photo_outlined, size: 64)),
const Positioned(left: 16, right: 16, bottom: 16,
child: Text('A label over a bounded preview')),
]))),
),
));Read the result
Positioned.fill covers the available region. The label uses left and right bounds, so it can wrap within the preview. Positioned must be placed in a compatible Stack ancestry; inserting it inside an unrelated layout can trigger ParentData errors.
Locate the coordinate system and the bounded region
In the example, the SizedBox gives Stack a definite play area. Positioned.fill covers that area, while the bottom label uses left, right and bottom offsets relative to the same stack. Those offsets are not screen coordinates and will move with the parent region.
That makes Stack appropriate for a bounded image preview or game surface. It becomes fragile when used to hand-position every paragraph in a long document: text growth changes the space each item needs, but fixed offsets do not automatically account for those changes.
Compare the fixed region with rows and columns , where children participate in normal flow. For games, study input coordinates before comparing a tap position with an entity’s world position.
Practice and verification
Add a top-right close button with a tooltip. Increase text size and check whether the bottom label can overlap the central content. Decide whether a larger layout region or normal flow is more appropriate.