column function

Widget column(
  1. Iterable<Widget> children, {
  2. Color? color,
  3. WidgetWrapper? wrapper,
  4. 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),
      ],
    ),
  );
}