Commit 9e3ba111 authored by Ian Hickson's avatar Ian Hickson

Merge pull request #1710 from Hixie/unique-key

UniqueKey
parents 7acc24e4 188aade2
...@@ -42,6 +42,12 @@ class ValueKey<T> extends Key { ...@@ -42,6 +42,12 @@ class ValueKey<T> extends Key {
String toString() => '[\'$value\']'; String toString() => '[\'$value\']';
} }
/// A [Key] that is only equal to itself.
class UniqueKey extends Key {
const UniqueKey() : super.constructor();
String toString() => '[$hashCode]';
}
/// A kind of [Key] that takes its identity from the object used as its value. /// A kind of [Key] that takes its identity from the object used as its value.
/// ///
/// Used to tie the identity of a Widget to the identity of an object used to /// Used to tie the identity of a Widget to the identity of an object used to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment