columnsContainer static method
Container
columnsContainer({
- required List<
List< columns,Widget> > - EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- Color color = Colors.transparent,
- MainAxisAlignment? mainAxisAlignment,
- CrossAxisAlignment? crossAxisAlignment,
- MainAxisSize mainAxisSize = MainAxisSize.max,
Multiple Columns container to display
Implementation
static Container columnsContainer({
required List<List<Widget>> columns,
EdgeInsetsGeometry? margin,
EdgeInsetsGeometry? padding,
Color color = Colors.transparent,
MainAxisAlignment? mainAxisAlignment,
CrossAxisAlignment? crossAxisAlignment,
MainAxisSize mainAxisSize = MainAxisSize.max,
}) {
if (margin == null) margin = EdgeInsets.all(0);
if (crossAxisAlignment == null) {
crossAxisAlignment = CrossAxisAlignment.center;
}
if (mainAxisAlignment == null) mainAxisAlignment = MainAxisAlignment.start;
List<Widget> children = [];
columns.forEach((column) {
children.add(
Expanded(
child: Column(
crossAxisAlignment: crossAxisAlignment!,
mainAxisAlignment: mainAxisAlignment!,
mainAxisSize: mainAxisSize,
children: column)),
);
});
return Container(
margin: margin,
padding: padding,
color: color,
child: Row(
crossAxisAlignment: crossAxisAlignment,
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
children: children,
),
);
}