Stacked does not repaint when its position changes
We were marking the parent *Widget's* render object as needing layout, but
we actually need to walk up the component tree until we find the parent
*RenderObjectWrapper* so we can mark actually mark the parent render object as
needing layout.
Fixes #408
diff --git a/packages/flutter/lib/widgets/widget.dart b/packages/flutter/lib/widgets/widget.dart
index 60efa0a..dcab05d 100644
--- a/packages/flutter/lib/widgets/widget.dart
+++ b/packages/flutter/lib/widgets/widget.dart
@@ -887,8 +887,8 @@
if (parentData != null) {
assert(root.parentData != null);
root.parentData.merge(parentData); // this will throw if the types aren't appropriate
- if (parent.root != null)
- parent.root.markNeedsLayout();
+ if (ancestor != null && ancestor.root != null)
+ ancestor.root.markNeedsLayout();
}
}