ColumnWithSpacing constructor

ColumnWithSpacing({
  1. Key? key,
  2. double spacing = 8,
  3. bool hasLeadingSpace = false,
  4. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  5. MainAxisSize mainAxisSize = MainAxisSize.max,
  6. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  7. TextDirection? textDirection,
  8. VerticalDirection verticalDirection = VerticalDirection.down,
  9. TextBaseline? textBaseline,
  10. List<Widget> children = const [],
})

Implementation

ColumnWithSpacing({
  super.key,
  double spacing = 8,
  bool hasLeadingSpace = false,
  super.mainAxisAlignment,
  super.mainAxisSize,
  super.crossAxisAlignment,
  super.textDirection,
  super.verticalDirection,
  super.textBaseline,
  List<Widget> children = const [],
}) : super(children: [
        ...hasLeadingSpace ? [SizedBox(height: spacing)] : <Widget>[],
        ...children.expand((element) => [element, SizedBox(height: spacing)]),
      ]);