toColumn method

Widget? toColumn([
  1. Widget ifEmpty()?
])

Implementation

Widget? toColumn([Widget ifEmpty()?]) {
  final columnItems = (this ?? [])

      /// We accept non blank strings and non-null everything elses
      .where((final _) =>
          (_ is! String && _ != null) || (_ is String && _.isNotNullOrBlank));

  if (columnItems.isEmpty) {
    return null;
  } else {
    return column([
      for (final line in columnItems) textOrNull(line)!,
    ]);
  }
}