FlatStack constructor

FlatStack({
  1. Key? key,
  2. AlignmentGeometry alignment = AlignmentDirectional.topStart,
  3. TextDirection? textDirection,
  4. StackFit fit = StackFit.loose,
  5. Clip clipBehavior = Clip.hardEdge,
  6. required WidgetGroupFunction of,
})

Flat version of Stack widget allowing you to provide the widgets using a function for more convenient syntax. You provide the widgets by concatenating widgets using plus + operator. For example: FlatStack(of: () => Text("Hello") + Text("World")

Implementation

FlatStack(
  {Key? key,
  AlignmentGeometry alignment = AlignmentDirectional.topStart,
  TextDirection? textDirection,
  StackFit fit = StackFit.loose,
  Clip clipBehavior = Clip.hardEdge,
  required WidgetGroupFunction of})
  : super(
        key: key,
        alignment: alignment,
        textDirection: textDirection,
        fit: fit,
        clipBehavior: clipBehavior,
        children: of().widgets);