-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Make Element tree root generic #123352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Element tree root generic #123352
Conversation
The fix for the flutter_plugins check is flutter/packages#3539. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -6323,14 +6323,28 @@ abstract class RenderObjectElement extends Element { | |||
} | |||
} | |||
|
|||
/// The element at the root of the tree. | |||
/// Deprecated. Will be removed in a future version of Flutter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also mention that it is no longer used by Flutter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
f6315eb
to
f5f884e
Compare
f5f884e
to
b657ffa
Compare
flutter/packages#3539 has rolled into the framework in #123542. |
auto label is removed for flutter/flutter, pr: 123352, due to - The status or check suite Linux customer_testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
customer_testing failures are (unrelated) flakes hopefully fixed with flutter/tests#239. |
auto label is removed for flutter/flutter, pr: 123352, due to - The status or check suite customer_testing-linux has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Part of #121573.
This change allows the root of the element tree to be any
Element
(not just aRenderObjectElement
). For that, it introduces theRootElementMixin
, which can be used to make any Element subclass the root of the element tree. It replaces theRootRenderObjectElement
, which is now deprecated in favor of the new mixin. In addition to that, it renames therenderViewElement
accessor on the WidgetsBinding torootElement
to remove the implied assumption that the root is aRenderObjectElement
.This is in preparation for further changes towards multi-view rendering, where the root of the element tree will not be backed by render objects, see https://docs.flutter.dev/go/multiple-views for the details of that.