mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-10-31 10:03:18 +00:00 
			
		
		
		
	
		
			
	
	
		
			9 lines
		
	
	
		
			234 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
		
		
			
		
	
	
			9 lines
		
	
	
		
			234 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
|   | extension Unique<E, Id> on List<E> { | ||
|  |   List<E> unique([Id Function(E element)? id]) { | ||
|  |     final ids = <dynamic>{}; | ||
|  |     final list = [...this]; | ||
|  |     list.retainWhere((x) => ids.add(id != null ? id(x) : x as Id)); | ||
|  |     return list; | ||
|  |   } | ||
|  | } |