-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Ignore unmounted parent when _debugVerifyGlobalKeyReservation for GlobalKey check #62323
Conversation
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.
LGTM, Nice fix! I left a small nit.
// We ignore parent that are detached. | ||
if (parent.renderObject?.attached == false) | ||
// We ignore parent that are detached or unmounted. | ||
if (parent.renderObject?.attached == false || parent._debugLifecycleState == _ElementLifecycle.defunct) |
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.
lets move the check parent._debugLifecycleState == _ElementLifecycle.defunct
to the first before we check attached
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.
Done.
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.
LGTM
…balKey check (flutter#62323) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055)
…balKey check (flutter#62323) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055) * Ignore unmounted parent when _debugVerifyGlobalKeyReservation (flutter#62055)
Description
@chunhtai @HansMuller please review, thanks. ^_^
minimal code sample
when rebuild tabs with the 1'st page(current tabs' index == 1), The following things will happen:
Finally, step 1's reservation global key will trigger the exception, and parent.renderObject is null, so can not be prevented check from the following code:
if (parent.renderObject?.attached == false)
return;
Logs
1.first build 'key1'Widget at build scope phase:
I/flutter (30350): #0 debugPrintStack (package:flutter/src/foundation/assertions.dart:1109:29)
I/flutter (30350): ... Normal element mounting (38 frames)
I/flutter (30350): #38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3536:14)
I/flutter (30350): #39 Element.updateChild (package:flutter/src/widgets/framework.dart:3277:18)
I/flutter (30350): #40 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:1157:36)
I/flutter (30350): #41 SliverMultiBoxAdaptorElement.performRebuild.processElement (package:flutter/src/widgets/sliver.dart:1075:34)
I/flutter (30350): #42 SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:1120:23)
I/flutter (30350): #43 SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:1054:7)
I/flutter (30350): #44 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #45 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #46 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #47 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #48 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #49 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #50 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #51 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5620:32)
I/flutter (30350): #52 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6055:17)
I/flutter (30350): #53 _ViewportElement.update (package:flutter/src/widgets/viewport.dart:213:11)
I/flutter (30350): #54 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #55 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #56 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #57 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #58 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #59 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #60 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #61 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #62 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #63 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #64 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #65 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #66 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #67 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #68 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #69 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #70 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #71 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #72 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #73 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #74 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #75 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #76 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #77 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #78 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #79 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #80 ProxyElement.update (package:flutter/src/widgets/framework.dart:4960:5)
I/flutter (30350): #81 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #82 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #83 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #84 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #85 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #86 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #87 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #88 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #89 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #90 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #91 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #92 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #93 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #94 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #95 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #96 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #97 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #98 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #99 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #100 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #101 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #102 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #103 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #104 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #105 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #106 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #107 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #108 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #109 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #110 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #111 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #112 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #113 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #114 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #115 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #116 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #117 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #118 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #119 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #120 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #121 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #122 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #123 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #124 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #125 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #126 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #127 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #128 ProxyElement.update (package:flutter/src/widgets/framework.dart:4960:5)
I/flutter (30350): #129 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #130 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #131 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #132 ProxyElement.update (package:flutter/src/widgets/framework.dart:4960:5)
I/flutter (30350): #133 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #134 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5620:32)
I/flutter (30350): #135 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6055:17)
I/flutter (30350): #136 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #137 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #138 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #139 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #140 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #141 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #142 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #143 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #144 ProxyElement.update (package:flutter/src/widgets/framework.dart:4960:5)
I/flutter (30350): #145 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #146 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #147 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #148 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #149 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #150 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #151 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #152 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #153 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #154 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #155 StatelessElement.update (package:flutter/src/widgets/framework.dart:4681:5)
I/flutter (30350): #156 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #157 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5935:14)
I/flutter (30350): #158 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #159 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #160 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #161 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #162 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #163 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #164 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #165 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #166 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #167 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #168 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #169 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #170 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #171 ProxyElement.update (package:flutter/src/widgets/framework.dart:4960:5)
I/flutter (30350): #172 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #173 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #174 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #175 ProxyElement.update (package:flutter/src/widgets/framework.dart:4960:5)
I/flutter (30350): #176 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #177 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #178 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #179 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #180 StatefulElement.update (package:flutter/src/widgets/framework.dart:4805:5)
I/flutter (30350): #181 Element.updateChild (package:flutter/src/widgets/framework.dart:3264:15)
I/flutter (30350): #182 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4625:16)
I/flutter (30350): #183 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4773:11)
I/flutter (30350): #184 Element.rebuild (package:flutter/src/widgets/framework.dart:4316:5)
I/flutter (30350): #185 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2680:33)
I/flutter (30350): #186 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:880:20)
I/flutter (30350): #187 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5)
I/flutter (30350): #188 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1114:15)
I/flutter (30350): #189 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1053:9)
I/flutter (30350): #190 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:969:5)
I/flutter (30350): #194 _invoke (dart:ui/hooks.dart:253:10)
I/flutter (30350): #195 _drawFrame (dart:ui/hooks.dart:211:3)
I/flutter (31382): #0 debugPrintStack (package:flutter/src/foundation/assertions.dart:1109:29)
I/flutter (31382): #1 Element.updateChild (package:flutter/src/widgets/framework.dart:3226:7)
I/flutter (31382): #2 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:1157:36)
I/flutter (31382): #3 SliverMultiBoxAdaptorElement.removeChild. (package:flutter/src/widgets/sliver.dart:1185:32)
I/flutter (31382): #4 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2633:19)
I/flutter (31382): #5 SliverMultiBoxAdaptorElement.removeChild (package:flutter/src/widgets/sliver.dart:1181:11)
I/flutter (31382): #6 RenderSliverMultiBoxAdaptor._destroyOrCacheChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:372:21)
I/flutter (31382): #7 RenderSliverMultiBoxAdaptor.collectGarbage. (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:516:9)
I/flutter (31382): #8 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:1879:58)
I/flutter (31382): #9 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:927:15)
I/flutter (31382): #10 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1879:13)
I/flutter (31382): #11 RenderSliverMultiBoxAdaptor.collectGarbage (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:514:5)
I/flutter (31382): #12 RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:193:7)
I/flutter (31382): #13 RenderObject.layout (package:flutter/src/rendering/object.dart:1776:7)
I/flutter (31382): #14 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:137:11)
I/flutter (31382): #15 _RenderSliverFractionalPadding.performLayout (package:flutter/src/widgets/sliver_fill.dart:170:11)
I/flutter (31382): #16 RenderObject.layout (package:flutter/src/rendering/object.dart:1776:7)
I/flutter (31382): #17 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:471:13)
I/flutter (31382): #18 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1465:12)
I/flutter (31382): #19 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1374:20)
I/flutter (31382): #20 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1639:7)
I/flutter (31382): #21 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:896:18)
I/flutter (31382): #22 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:404:19)
I/flutter (31382): #23 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:881:13)
I/flutter (31382): #24 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5)
I/flutter (31382): #25 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1114:15)
I/flutter (31382): #26 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1053:9)
I/flutter (31382): #27 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:969:5)
I/flutter (31382): #31 _invoke (dart:ui/hooks.dart:253:10)
I/flutter (31382): #32 _drawFrame (dart:ui/hooks.dart:211:3)
I/flutter ( 4407): #0 debugPrintStack (package:flutter/src/foundation/assertions.dart:1109:29)
I/flutter ( 4407): #1 Element.updateChild (package:flutter/src/widgets/framework.dart:3226:7)
I/flutter ( 4407): ... Normal element mounting (39 frames)
I/flutter ( 4407): #40 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3536:14)
I/flutter ( 4407): #41 Element.updateChild (package:flutter/src/widgets/framework.dart:3277:18)
I/flutter ( 4407): #42 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:1157:36)
I/flutter ( 4407): #43 SliverMultiBoxAdaptorElement.createChild. (package:flutter/src/widgets/sliver.dart:1142:20)
I/flutter ( 4407): #44 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2633:19)
I/flutter ( 4407): #45 SliverMultiBoxAdaptorElement.createChild (package:flutter/src/widgets/sliver.dart:1135:11)
I/flutter ( 4407): #46 RenderSliverMultiBoxAdaptor._createOrObtainChild. (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:356:23)
I/flutter ( 4407): #47 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:1879:58)
I/flutter ( 4407): #48 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:927:15)
I/flutter ( 4407): #49 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1879:13)
I/flutter ( 4407): #50 RenderSliverMultiBoxAdaptor._createOrObtainChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:345:5)
I/flutter ( 4407): #51 RenderSliverMultiBoxAdaptor.addInitialChild (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:429:5)
I/flutter ( 4407): #52 RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:199:12)
I/flutter ( 4407): #53 RenderObject.layout (package:flutter/src/rendering/object.dart:1776:7)
I/flutter ( 4407): #54 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:137:11)
I/flutter ( 4407): #55 _RenderSliverFractionalPadding.performLayout (package:flutter/src/widgets/sliver_fill.dart:170:11)
I/flutter ( 4407): #56 RenderObject.layout (package:flutter/src/rendering/object.dart:1776:7)
I/flutter ( 4407): #57 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:471:13)
I/flutter ( 4407): #58 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1465:12)
I/flutter ( 4407): #59 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1374:20)
I/flutter ( 4407): #60 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1639:7)
I/flutter ( 4407): #61 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:896:18)
I/flutter ( 4407): #62 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:404:19)
I/flutter ( 4407): #63 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:881:13)
I/flutter ( 4407): #64 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5)
I/flutter ( 4407): #65 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1114:15)
I/flutter ( 4407): #66 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1053:9)
I/flutter ( 4407): #67 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:969:5)
I/flutter ( 4407): #71 _invoke (dart:ui/hooks.dart:253:10)
I/flutter ( 4407): #72 _drawFrame (dart:ui/hooks.dart:211:3)
Related Issues
#62055
Tests
I added the following tests:
'GlobalKey - re-attach child to new parents, and old parent is deactivated(unmounted)' in framework_test.dart
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.