commaSeparatedWithAnd property

String get commaSeparatedWithAnd

Returns a comma-separated string with the last element preceded by 'and'.

Examples:

  • 'a', 'b' → "a and b"
  • 'a', 'b', 'c' → "a, b, and c"

Implementation

String get commaSeparatedWithAnd => _formatWithConjunction('and');