unique<T> static method

List<T> unique<T>(
  1. List<T>? q1, [
  2. List<T>? q2
])

unique for int, String, double List

Implementation

static List<T> unique<T>(List<T>? q1, [List<T>? q2]) {
  if (isEmpty(q1) && isEmpty(q2)) {
    return <T>[];
  }
  final arr = <T>[...?q1, ...?q2];
  return Set<T>.from(arr).toList();
}