stackPassthrough method
Stack
stackPassthrough({
- AlignmentGeometry alignment = AlignmentDirectional.topStart,
- TextDirection? textDirection,
- Clip clipBehavior = Clip.hardEdge,
Creates a Stack with StackFit.passthrough sizing behavior.
In passthrough mode, the stack will pass through the constraints from its parent to its children, allowing them to size themselves naturally. This is useful when you want the stack to be as small as possible while still containing all its children.
Parameters:
alignment: How to align the children in the stack. Defaults to AlignmentDirectional.topStart.textDirection: The text direction to use when resolving alignment.clipBehavior: The content clipping behavior. Defaults to Clip.hardEdge.
Returns a Stack widget with passthrough sizing behavior.
Implementation
Stack stackPassthrough({
AlignmentGeometry alignment = AlignmentDirectional.topStart,
TextDirection? textDirection,
Clip clipBehavior = Clip.hardEdge,
}) =>
stack(
fit: StackFit.passthrough,
alignment: alignment,
textDirection: textDirection,
clipBehavior: clipBehavior,
);