Commit 568fa07e authored by Hans Muller's avatar Hans Muller

PageStorage storage identifier should include the context widgets key

parent 15eeb7f5
......@@ -31,6 +31,10 @@ class _StorageEntryIdentifier {
return true;
}
int get hashCode => hashValues(clientType, scopeKey, hashList(keys));
String toString() {
return 'StorageEntryIdentifier($clientType, $scopeKey, ${keys?.join(":")})';
}
}
class PageStorageBucket {
......@@ -39,6 +43,8 @@ class PageStorageBucket {
result.clientType = context.widget.runtimeType;
Key lastKey = context.widget.key;
if (lastKey is! GlobalKey) {
if (lastKey != null)
result.addKey(lastKey);
context.visitAncestorElements((Element element) {
if (element.widget.key is GlobalKey) {
lastKey = element.widget.key;
......
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