VStack function
Widget
VStack(
- dynamic children, {
- double spacing = 0,
- dynamic mainAxisSize = MainAxisSize.min,
- dynamic mainAxisAlignment = MainAxisAlignment.start,
- dynamic crossAxisAlignment = CrossAxisAlignment.start,
- 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,
);
}