join static method

String join(
  1. List<Object?>? list, {
  2. String separator = '',
})

Returns the joined elements of the list.

If the list is null then an empty String is returned. If any element in list is null it is treated as an empty string but still included in the list.

Example: print(join(null)); => ''

print(join([1, 2]));
=> 12
print(join([1, 2], separator: ','));
=> 1,2

Implementation

static String join(List<Object?>? list, {String separator = ''}) =>
    Part.join(list, separator: separator);