mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
17 lines
337 B
Dart
17 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;
|
||
|
}
|