mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
16 lines
337 B
Dart
16 lines
337 B
Dart
import 'package:to_string/to_string.dart';
|
|
|
|
part 'unique.g.dart';
|
|
|
|
/// An unique value does not compare equal with others having the same value,
|
|
/// instead only the same instances are considered equal
|
|
@toString
|
|
class Unique<T> {
|
|
// no const!
|
|
Unique(this.value);
|
|
|
|
@override
|
|
String toString() => _$toString();
|
|
|
|
final T value;
|
|
}
|