stack method
Stack
stack({
- AlignmentGeometry alignment = AlignmentDirectional.topStart,
- TextDirection? textDirection,
- StackFit fit = StackFit.loose,
- Clip clipBehavior = Clip.hardEdge,
Creates a Stack widget with the specified configuration.
This is the base method that all other stack methods delegate to. It provides full control over all stack properties.
Parameters:
alignment: How to align the non-positioned and partially-positioned children in the stack. Defaults to AlignmentDirectional.topStart.textDirection: The text direction to use when resolving alignment.fit: How to size the non-positioned children in the stack. Defaults to StackFit.loose.clipBehavior: The content will be clipped (or not) according to this option. Defaults to Clip.hardEdge.
Returns a Stack widget containing all widgets from this list as children.
Implementation
Stack stack({
AlignmentGeometry alignment = AlignmentDirectional.topStart,
TextDirection? textDirection,
StackFit fit = StackFit.loose,
Clip clipBehavior = Clip.hardEdge,
}) =>
Stack(
alignment: alignment,
textDirection: textDirection,
fit: fit,
clipBehavior: clipBehavior,
children: this,
);