buildParts method

String buildParts(
  1. List<String> partList,
  2. String part
)
inherited

Implementation

String buildParts(List<String> partList, String part) {
  if (partList.isEmpty && part == '') {
    throw Exception(
        'I need either of the partList or part field to have an entry');
  }

  final List<String> tmpList = [];

  tmpList.addAll(partList);

  tmpList.addAll(part.trim().split(','));

  return tmpList.toSet().toList().join(',');
}