Stack constructor Null safety

Stack(
  1. {Key? key,
  2. AlignmentGeometry alignment = AlignmentDirectional.topStart,
  3. TextDirection? textDirection,
  4. StackFit fit = StackFit.loose,
  5. @Deprecated('Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. ' 'This feature was deprecated after v1.22.0-12.0.pre.') Overflow overflow = Overflow.clip,
  6. Clip clipBehavior = Clip.hardEdge,
  7. List<Widget> children = const <Widget>[]}
)

Creates a stack layout widget.

By default, the non-positioned children of the stack are aligned by their top left corners.

Implementation

Stack({
  Key? key,
  this.alignment = AlignmentDirectional.topStart,
  this.textDirection,
  this.fit = StackFit.loose,
  @Deprecated(
    'Use clipBehavior instead. See the migration guide in flutter.dev/go/clip-behavior. '
    'This feature was deprecated after v1.22.0-12.0.pre.',
  )
  this.overflow = Overflow.clip,
  this.clipBehavior = Clip.hardEdge,
  List<Widget> children = const <Widget>[],
}) : assert(clipBehavior != null),
     super(key: key, children: children);