VStack function

Widget VStack(
  1. dynamic children, {
  2. double spacing = 0,
  3. dynamic mainAxisSize = MainAxisSize.min,
  4. dynamic mainAxisAlignment = MainAxisAlignment.start,
  5. dynamic crossAxisAlignment = CrossAxisAlignment.start,
  6. dynamic verticalDirection = VerticalDirection.down,
})

Implementation

Widget VStack(
  children, {
  double spacing = 0,
  mainAxisSize = MainAxisSize.min,
  mainAxisAlignment = MainAxisAlignment.start,
  crossAxisAlignment = CrossAxisAlignment.start,
  verticalDirection = VerticalDirection.down,
}) {
  children = _getChildren(children);

  var items=<Widget>[];
  for (var i=0;i<children.length;i++) {
    var item=children[i];
    items.add(item);
    if(i>0) {
      items.add(spacing.hPadding);
    }
  }
  return Column(
    mainAxisSize: mainAxisSize,
    mainAxisAlignment: mainAxisAlignment,
    crossAxisAlignment: crossAxisAlignment,
    verticalDirection: verticalDirection,
    children: items,
  );
}