Skip to content

Commit

Permalink
provide correct parent keys before building children
Browse files Browse the repository at this point in the history
  • Loading branch information
pinyin committed May 9, 2019
1 parent 0697cc7 commit 47e9056
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/fragments.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ mixin Fragments<W extends StatefulWidget> on State<W> {

if (isInit || !shallowEquals(self.keys, keys)) {
root.container.now = self;
self.value = builder(self.value, self.keys);
final prevKeys = self.keys;
self.keys = keys;
self.value = builder(self.value, prevKeys);
assert(identical(root.container.now, self));
root.container.now = parent;
}
Expand Down

0 comments on commit 47e9056

Please sign in to comment.