asString static method

String? asString(
  1. Iterable<String>? iterable
)

Converts a list of strings to a formatted string.

Example: 'one', 'two', 'three' -> 'one, two, and three'

Implementation

static String? asString(Iterable<String>? iterable) {
  if (iterable == null || iterable.isEmpty) return null;
  return iterable.text;
}