combinedOrderedStringId function

String combinedOrderedStringId(
  1. List<String> ids
)

Generates an ordered ID from a list of unordered IDs, that can be used to identify the list of IDs.

For example, this can be used to combine user IDs into a single ID that represents the group of users.

Implementation

String combinedOrderedStringId(List<String> ids) {
  final sorted = ids..sort((a, b) => a.compareTo(b));
  final combined = sorted.join('_');
  return combined;
}