getSetDifference<T> function

Set<T> getSetDifference<T>(
  1. Set<T> before,
  2. Set<T> after
)

Returns the difference between two sets.

Implementation

Set<T> getSetDifference<T>(Set<T> before, Set<T> after) {
  final results = <T>{};
  for (final a in after) {
    if (!before.contains(a)) results.add(a);
  }
  return results;
}