column function
Widget
column(
- Iterable<
Widget> children, { - Color? color,
- WidgetWrapper? wrapper,
- Widget ifEmpty()?,
Implementation
Widget column(Iterable<Widget> children,
{Color? color, WidgetWrapper? wrapper, Widget ifEmpty()?}) {
if (children.isEmpty && ifEmpty != null) {
return ifEmpty();
}
return Container(
color: color,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
...children.map((widget) => wrapper?.call(widget) ?? widget),
],
),
);
}