Skip to content
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

Fix compile error introduced by #44 #47

Merged
merged 6 commits into from
Mar 7, 2022
Merged

Fix compile error introduced by #44 #47

merged 6 commits into from
Mar 7, 2022

Conversation

fzyzcjy
Copy link
Owner

@fzyzcjy fzyzcjy commented Mar 7, 2022

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

Log

When running the code:

(base) ➜  flutter_portal git:(master) ✗ flutter test
00:03 +5: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                          
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter_portal/src/flutter_src/layer.dart': Failed assertion: line 199 pos 12: '_lastOffset
!= null': is not true.

When the exception was thrown, this was the stack:
#2      MyLeaderLayer.applyTransform (package:flutter_portal/src/flutter_src/layer.dart:199:12)
#3      _CustomFollowerLayer._establishTransform (package:flutter_portal/src/custom_follower.dart:400:12)
#4      _CustomFollowerLayer.addToScene (package:flutter_portal/src/custom_follower.dart:428:5)
#5      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:545:5)
#6      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1105:13)
#7      PhysicalModelLayer.addToScene (package:flutter/src/rendering/layer.dart:2085:5)
#8      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:545:5)
#9      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1105:13)
#10     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1239:5)
#11     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:545:5)
#12     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1105:13)
#13     OpacityLayer.addToScene (package:flutter/src/rendering/layer.dart:1799:5)
#14     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:545:5)
#15     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1105:13)
#16     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1239:5)
#17     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:545:5)
#18     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1105:13)
#19     TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1680:5)
#20     ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:937:5)
#21     RenderView.compositeFrame (package:flutter/src/rendering/view.dart:228:37)
#22     AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:1138:26)
#23     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:363:5)
#24     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
#25     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1081:9)
#26     AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:995:9)
#29     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:71:41)
#30     AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:982:27)
#31     WidgetTester.pumpWidget.<anonymous closure> (package:flutter_test/src/widget_tester.dart:548:22)
#34     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:71:41)
#35     WidgetTester.pumpWidget (package:flutter_test/src/widget_tester.dart:545:27)
#36     main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/anchor_test.dart:120:18)
<asynchronous suspension>
<asynchronous suspension>
(elided 7 frames from class _AssertionError, dart:async, and package:stack_trace)
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +6: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                          
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: <true>
  Actual: <false>

When the exception was thrown, this was the stack:
#4      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/anchor_test.dart:136:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///Users/tom/RefCode/flutter_portal/test/anchor_test.dart line 136
The test description was:
  Aligned defers to backup if needed
════════════════════════════════════════════════════════════════════════════════════════════════════
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following message was thrown:
Multiple exceptions (2) were detected during the running of the current test, and at least one was
unexpected.
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +6 -1: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed [E]                                   
  Test failed. See exception logs above.
  The test description was: Aligned defers to backup if needed
  
00:04 +19 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                

Warning: A call to tap() with finder "exactly one widget with text "child" (ignoring offstage widgets): Text("child", dependencies: [MediaQuery, DefaultTextStyle])" derived an Offset (Offset(32.0, 24.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderParagraph#5a775 relayoutBoundary=up15
The hit test result at that offset is: HitTestResult(RenderPointerListener#9fae7@Offset(32.0, 24.0), RenderSemanticsAnnotations#d5bed@Offset(32.0, 24.0), RenderMouseRegion#49894@Offset(32.0, 24.0), RenderSemanticsAnnotations#52fd3@Offset(32.0, 24.0), _RenderInkFeatures#24826@Offset(32.0, 24.0), RenderCustomPaint#cbfa1@Offset(32.0, 24.0), RenderPhysicalShape#4da47@Offset(32.0, 24.0), RenderConstrainedBox#cddf1@Offset(32.0, 24.0), _RenderInputPadding#30f79@Offset(32.0, 24.0), RenderSemanticsAnnotations#7f153@Offset(32.0, 24.0), _RenderPortalTheater#48a91@Offset(32.0, 24.0), RenderCustomMultiChildLayoutBox#9a157@Offset(32.0, 24.0), _RenderInkFeatures#641f7@Offset(32.0, 24.0), RenderPhysicalModel#df1e9@Offset(32.0, 24.0), RenderSemanticsAnnotations#64d91@Offset(32.0, 24.0), RenderRepaintBoundary#dbd9a@Offset(32.0, 24.0), RenderIgnorePointer#6387e@Offset(32.0, 24.0), RenderAnimatedOpacity#6623c@Offset(32.0, 24.0), RenderRepaintBoundary#c6940@Offset(32.0, 24.0), _RenderFocusTrap#aaedd@Offset(32.0, 24.0), RenderSemanticsAnnotations#3d563@Offset(32.0, 24.0), RenderOffstage#1d074@Offset(32.0, 24.0), RenderSemanticsAnnotations#295fa@Offset(32.0, 24.0), _RenderTheatre#986bf@Offset(32.0, 24.0), RenderSemanticsAnnotations#e49b4@Offset(32.0, 24.0), RenderAbsorbPointer#2b979@Offset(32.0, 24.0), RenderPointerListener#e9651@Offset(32.0, 24.0), RenderSemanticsAnnotations#99aa2@Offset(32.0, 24.0), RenderSemanticsAnnotations#e196a@Offset(32.0, 24.0), RenderSemanticsAnnotations#b6649@Offset(32.0, 24.0), RenderSemanticsAnnotations#0fda3@Offset(32.0, 24.0), HitTestEntry#54064(RenderView#f127a), HitTestEntry#f8525(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:769:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:05 +23 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                          

Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#c7e9b relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry#1526d(TextSpan(<all styles inherited>, "a")), RenderParagraph#b399d@Offset(400.0, 300.0), RenderPointerListener#070b2@Offset(400.0, 300.0), RenderSemanticsGestureHandler#2456f@Offset(400.0, 300.0), _RenderPortalTheater#1915b@Offset(400.0, 300.0), HitTestEntry#4e1f0(RenderView#f127a), HitTestEntry#18c02(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:992:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.


Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#8a171 relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry#7a12d(TextSpan(<all styles inherited>, "a")), RenderParagraph#2396f@Offset(400.0, 300.0), RenderPointerListener#ff7a8@Offset(400.0, 300.0), RenderSemanticsGestureHandler#00cf4@Offset(400.0, 300.0), _RenderPortalTheater#1915b@Offset(400.0, 300.0), HitTestEntry#182fa(RenderView#f127a), HitTestEntry#16026(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:1071:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:05 +34 ~2 -1: Some tests failed.                                                   

When running old workable code:

(base) ➜  flutter_portal git:(temp1) ✗ flutter test
00:05 +18: clicking on portal if above child clicks only the portal                                                                            

Warning: A call to tap() with finder "exactly one widget with text "child" (ignoring offstage widgets): Text("child", dependencies: [MediaQuery, DefaultTextStyle])" derived an Offset (Offset(32.0, 24.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderParagraph#15701 relayoutBoundary=up15
The hit test result at that offset is: HitTestResult(RenderPointerListener#ffa1c@Offset(32.0, 24.0), RenderSemanticsAnnotations#a5053@Offset(32.0, 24.0), RenderMouseRegion#c1712@Offset(32.0, 24.0), RenderSemanticsAnnotations#252d3@Offset(32.0, 24.0), _RenderInkFeatures#2070f@Offset(32.0, 24.0), RenderCustomPaint#ab6b1@Offset(32.0, 24.0), RenderPhysicalShape#2dad7@Offset(32.0, 24.0), RenderConstrainedBox#3a524@Offset(32.0, 24.0), _RenderInputPadding#1146c@Offset(32.0, 24.0), RenderSemanticsAnnotations#dc87d@Offset(32.0, 24.0), _RenderPortalTheater#ef1e5@Offset(32.0, 24.0), RenderCustomMultiChildLayoutBox#44050@Offset(32.0, 24.0), _RenderInkFeatures#176a1@Offset(32.0, 24.0), RenderPhysicalModel#63ad3@Offset(32.0, 24.0), RenderSemanticsAnnotations#24c06@Offset(32.0, 24.0), RenderRepaintBoundary#c0de5@Offset(32.0, 24.0), RenderIgnorePointer#37c3f@Offset(32.0, 24.0), RenderAnimatedOpacity#cc484@Offset(32.0, 24.0), RenderRepaintBoundary#e3cb1@Offset(32.0, 24.0), _RenderFocusTrap#f63fd@Offset(32.0, 24.0), RenderSemanticsAnnotations#b8c6a@Offset(32.0, 24.0), RenderOffstage#7d495@Offset(32.0, 24.0), RenderSemanticsAnnotations#4df09@Offset(32.0, 24.0), _RenderTheatre#500a4@Offset(32.0, 24.0), RenderSemanticsAnnotations#1bc2e@Offset(32.0, 24.0), RenderAbsorbPointer#e6ccb@Offset(32.0, 24.0), RenderPointerListener#2b329@Offset(32.0, 24.0), RenderSemanticsAnnotations#c241d@Offset(32.0, 24.0), RenderSemanticsAnnotations#00006@Offset(32.0, 24.0), RenderSemanticsAnnotations#b3243@Offset(32.0, 24.0), RenderSemanticsAnnotations#81260@Offset(32.0, 24.0), HitTestEntry#fdca5(RenderView#9d936), HitTestEntry#a2c37(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:761:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:05 +22: click works when switching between anchor/fill                                                                                      

Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#a0060 relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry#eb071(TextSpan(<all styles inherited>, "a")), RenderParagraph#9b077@Offset(400.0, 300.0), RenderPointerListener#a0e37@Offset(400.0, 300.0), RenderSemanticsGestureHandler#f4006@Offset(400.0, 300.0), _RenderPortalTheater#1cabe@Offset(400.0, 300.0), HitTestEntry#fa302(RenderView#9d936), HitTestEntry#c2982(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:978:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.


Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#97a7f relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry#43712(TextSpan(<all styles inherited>, "a")), RenderParagraph#5eb06@Offset(400.0, 300.0), RenderPointerListener#59647@Offset(400.0, 300.0), RenderSemanticsGestureHandler#6215c@Offset(400.0, 300.0), _RenderPortalTheater#1cabe@Offset(400.0, 300.0), HitTestEntry#38ae2(RenderView#9d936), HitTestEntry#f870b(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:1055:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:05 +35 ~3: All tests passed!

@fzyzcjy fzyzcjy force-pushed the fix-compile-error branch from 98d78d3 to 88c9f2b Compare March 7, 2022 10:21
@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

@creativecreatorormaybenot Could you please have a try on this PR and see whether the error is related to your tests? B/c seems that you are using a newer Flutter version, so Flutter behavior may change because of that.

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

All right. I see the error comes from this PR instead of @creativecreatorormaybenot's code on stable.

Run @creativecreatorormaybenot 's code in beta looks good:

(base) ➜  flutter_portal git:(master) ✗ fvm spawn beta test     
Spawning version "beta"...
00:00 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:01 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:02 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:02 +0: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration                                   00:03 +0: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration                                   00:03 +1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration                                   00:03 +2: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:03 +3: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:03 +4: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles dispose before timer end                                             00:03 +5: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles dispose before timer end                                             00:03 +5: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can update portal during close                                               00:03 +6: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can update portal during close                                               00:03 +6: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can cancel leave timer by reverting visible                                  00:03 +7: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can cancel leave timer by reverting visible                                  00:03 +7: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible false > true > false resets the timer and works properly             00:03 +8: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible false > true > false resets the timer and works properly             00:03 +8: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal                                 00:03 +9: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal                                 00:03 +9: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal (anchors)                       00:03 +10: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal (anchors)                      00:03 +10: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalProvider updates child                                                00:03 +11: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalProvider updates child                                                00:03 +11: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalEntry requires portal if visible is true                              00:03 +12: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalEntry requires portal if visible is true                              00:03 +12: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal required either portalBuilder or portal                              00:03 +13: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal required either portalBuilder or portal                              00:03 +13: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal synchronously add portals to PortalProvider                          00:03 +14: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal synchronously add portals to PortalProvider                          00:03 +14: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals aren't inserted if mounted is false, and visible can be changed any 00:03 +15: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals aren't inserted if mounted is false, and visible can be changed any 00:03 +15: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Unmounting Portal removes it on PortalProvider synchronously                00:03 +16: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Unmounting Portal removes it on PortalProvider synchronously                00:03 +16: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: throws if no Portal was found                                               00:03 +17: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: throws if no Portal was found                                               00:03 +17: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                                  00:04 +17: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                                  00:05 +17: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                                  00:05 +18: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                                  00:05 +18: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible defaults to true                                                    00:05 +19: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible defaults to true                                                    00:05 +19: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can insert a portal without rebuilding PortalProvider at the same time      00:05 +20: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can insert a portal without rebuilding PortalProvider at the same time      00:05 +20: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                    00:05 +20: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                                                                           

Warning: A call to tap() with finder "exactly one widget with text "child" (ignoring offstage widgets): Text("child", dependencies: [MediaQuery, DefaultTextStyle])" derived an Offset (Offset(32.0, 24.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderParagraph#d8b89 relayoutBoundary=up15
The hit test result at that offset is: HitTestResult(RenderPointerListener#2009e@Offset(32.0, 24.0), RenderSemanticsAnnotations#8594d@Offset(32.0, 24.0), RenderMouseRegion#a569f@Offset(32.0, 24.0), RenderSemanticsAnnotations#7700b@Offset(32.0, 24.0), _RenderInkFeatures#a033f@Offset(32.0, 24.0), RenderCustomPaint#73cdc@Offset(32.0, 24.0), RenderPhysicalShape#f45da@Offset(32.0, 24.0), RenderConstrainedBox#24807@Offset(32.0, 24.0), _RenderInputPadding#b7747@Offset(32.0, 24.0), RenderSemanticsAnnotations#8e025@Offset(32.0, 24.0), _RenderPortalTheater#9b6ac@Offset(32.0, 24.0), RenderCustomMultiChildLayoutBox#5edc0@Offset(32.0, 24.0), _RenderInkFeatures#feeaa@Offset(32.0, 24.0), RenderPhysicalModel#2162b@Offset(32.0, 24.0), RenderSemanticsAnnotations#fd891@Offset(32.0, 24.0), RenderRepaintBoundary#d7bd2@Offset(32.0, 24.0), RenderIgnorePointer#a7f73@Offset(32.0, 24.0), RenderAnimatedOpacity#c9223@Offset(32.0, 24.0), RenderRepaintBoundary#c96d2@Offset(32.0, 24.0), _RenderFocusTrap#e8514@Offset(32.0, 24.0), RenderSemanticsAnnotations#bfb12@Offset(32.0, 24.0), RenderOffstage#3f9a4@Offset(32.0, 24.0), RenderSemanticsAnnotations#f269c@Offset(32.0, 24.0), _RenderTheatre#6507d@Offset(32.0, 24.0), RenderSemanticsAnnotations#10470@Offset(32.0, 24.0), RenderAbsorbPointer#04188@Offset(32.0, 24.0), RenderPointerListener#f9af4@Offset(32.0, 24.0), RenderSemanticsAnnotations#9ac6c@Offset(32.0, 24.0), RenderSemanticsAnnotations#1e6dd@Offset(32.0, 24.0), RenderSemanticsAnnotations#d350f@Offset(32.0, 24.0), RenderSemanticsAnnotations#2bf5b@Offset(32.0, 24.0), HitTestEntry<HitTestTarget>#02a19(RenderView#9020d), HitTestEntry<HitTestTarget>#2f616(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:769:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:05 +21: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                    00:05 +21: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: if portal is not above child, we can click on both                          00:05 +22: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: if portal is not above child, we can click on both                          00:05 +22: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: alignment/size                                                              00:05 +23: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: alignment/size                                                              00:05 +23: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: defaults to fill if no anchor are specified                                 00:05 +24: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: defaults to fill if no anchor are specified                                 00:05 +24: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                              00:05 +24: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                                                                                     

Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#7a963 relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry<HitTestTarget>#f0e9e(TextSpan(<all styles inherited>, "a")), RenderParagraph#0d6f4@Offset(400.0, 300.0), RenderPointerListener#0b0e7@Offset(400.0, 300.0), RenderSemanticsGestureHandler#18c6d@Offset(400.0, 300.0), _RenderPortalTheater#fc34f@Offset(400.0, 300.0), HitTestEntry<HitTestTarget>#be314(RenderView#9020d), HitTestEntry<HitTestTarget>#bd01a(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:992:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.


Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#04744 relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry<HitTestTarget>#9a11f(TextSpan(<all styles inherited>, "a")), RenderParagraph#b8636@Offset(400.0, 300.0), RenderPointerListener#bb562@Offset(400.0, 300.0), RenderSemanticsGestureHandler#d7ce3@Offset(400.0, 300.0), _RenderPortalTheater#fc34f@Offset(400.0, 300.0), HitTestEntry<HitTestTarget>#cc5b2(RenderView#9020d), HitTestEntry<HitTestTarget>#a2528(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:1071:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:05 +25: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                              00:05 +25: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: anchor not null then null still clicks                                      00:05 +26: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: anchor not null then null still clicks                                      00:05 +26: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals can fill the Portal                                                 00:05 +27: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals can fill the Portal                                                 00:05 +27: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under MaterialApp                   00:05 +28: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under MaterialApp                   00:05 +28: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under CupertinoApp                  00:05 +29: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under CupertinoApp                  00:05 +29: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: both entry and modal rebuilds within the same frame with layoutbuilder betwe00:05 +30: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: both entry and modal rebuilds within the same frame with layoutbuilder betwe00:05 +30: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry on first build                      00:05 +31: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry on first build                      00:05 +31: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry without rebuilding portl            00:05 +32: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry without rebuilding portl            00:05 +32: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles reparenting with GlobalKey                                          00:05 +32 ~1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles reparenting with GlobalKey                                       00:05 +32 ~1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clip overflow                                                            00:05 +32 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clip overflow                                                            00:05 +32 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can have multiple portals                                                00:05 +33 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can have multiple portals                                                00:05 +33 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click is applied in reverse order of portal addition (last click first)  00:05 +34 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click is applied in reverse order of portal addition (last click first)  00:05 +34 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals paints in order of addition (last paints last)                   00:05 +35 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals paints in order of addition (last paints last)                   00:05 +35 ~2: All tests passed!           

But running this PR on beta has errors:

(base) ➜  flutter_portal git:(fix-compile-error) ✗ fvm spawn beta test   
Spawning version "beta"...
00:00 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:01 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:02 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:02 +0: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration                                   00:03 +0: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration                                   00:03 +1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration                                   00:03 +2: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:03 +3: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:03 +4: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:03 +5: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:03 +6: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:04 +6: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:04 +6: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                                                                                  
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter_portal/src/flutter_src/layer.dart': Failed assertion: line 199 pos 12: '_lastOffset
!= null': is not true.

When the exception was thrown, this was the stack:
#2      MyLeaderLayer.applyTransform (package:flutter_portal/src/flutter_src/layer.dart:199:12)
#3      _CustomFollowerLayer._establishTransform (package:flutter_portal/src/custom_follower.dart:400:12)
#4      _CustomFollowerLayer.addToScene (package:flutter_portal/src/custom_follower.dart:428:5)
#5      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:546:5)
#6      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1106:13)
#7      PhysicalModelLayer.addToScene (package:flutter/src/rendering/layer.dart:2086:5)
#8      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:546:5)
#9      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1106:13)
#10     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1240:5)
#11     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:546:5)
#12     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1106:13)
#13     OpacityLayer.addToScene (package:flutter/src/rendering/layer.dart:1800:5)
#14     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:546:5)
#15     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1106:13)
#16     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1240:5)
#17     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:546:5)
#18     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1106:13)
#19     TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1681:5)
#20     ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:938:5)
#21     RenderView.compositeFrame (package:flutter/src/rendering/view.dart:228:37)
#22     AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:1138:26)
#23     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:363:5)
#24     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1144:15)
#25     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1081:9)
#26     AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:995:9)
#29     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:71:41)
#30     AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:982:27)
#31     WidgetTester.pumpWidget.<anonymous closure> (package:flutter_test/src/widget_tester.dart:548:22)
#34     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:71:41)
#35     WidgetTester.pumpWidget (package:flutter_test/src/widget_tester.dart:545:27)
#36     main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/anchor_test.dart:120:18)
<asynchronous suspension>
<asynchronous suspension>
(elided 7 frames from class _AssertionError, dart:async, and package:stack_trace)
════════════════════════════════════════════════════════════════════════════════════════════════════
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure was thrown running a test:
Expected: <true>
  Actual: <false>

When the exception was thrown, this was the stack:
#4      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/anchor_test.dart:136:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
  file:///Users/tom/RefCode/flutter_portal/test/anchor_test.dart line 136
The test description was:
  Aligned defers to backup if needed
════════════════════════════════════════════════════════════════════════════════════════════════════
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following message was thrown:
Multiple exceptions (2) were detected during the running of the current test, and at least one was
unexpected.
════════════════════════════════════════════════════════════════════════════════════════════════════
00:04 +6 -1: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed [E]                                                                                           
  Test failed. See exception logs above.
  The test description was: Aligned defers to backup if needed
  
00:04 +7 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible false > true > false resets the timer and works properly          00:04 +7 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal                              00:04 +8 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal                              00:04 +8 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal (anchors)                    00:04 +9 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal (anchors)                    00:04 +9 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalProvider updates child                                              00:04 +10 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalProvider updates child                                             00:04 +10 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalEntry requires portal if visible is true                           00:04 +11 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalEntry requires portal if visible is true                           00:04 +11 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal required either portalBuilder or portal                           00:04 +12 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal required either portalBuilder or portal                           00:04 +12 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal synchronously add portals to PortalProvider                       00:04 +13 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal synchronously add portals to PortalProvider                       00:04 +13 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals aren't inserted if mounted is false, and visible can be changed a00:04 +14 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals aren't inserted if mounted is false, and visible can be changed a00:04 +14 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Unmounting Portal removes it on PortalProvider synchronously             00:04 +15 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Unmounting Portal removes it on PortalProvider synchronously             00:04 +15 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: throws if no Portal was found                                            00:04 +16 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: throws if no Portal was found                                            00:04 +16 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                               00:05 +16 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                               00:05 +17 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                               00:05 +17 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible defaults to true                                                 00:05 +18 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible defaults to true                                                 00:05 +18 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can insert a portal without rebuilding PortalProvider at the same time   00:05 +19 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can insert a portal without rebuilding PortalProvider at the same time   00:05 +19 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                 00:05 +19 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                                                                        

Warning: A call to tap() with finder "exactly one widget with text "child" (ignoring offstage widgets): Text("child", dependencies: [DefaultTextStyle, MediaQuery])" derived an Offset (Offset(32.0, 24.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderParagraph#b5619 relayoutBoundary=up15
The hit test result at that offset is: HitTestResult(RenderPointerListener#7e8d7@Offset(32.0, 24.0), RenderSemanticsAnnotations#edb3e@Offset(32.0, 24.0), RenderMouseRegion#da247@Offset(32.0, 24.0), RenderSemanticsAnnotations#2c842@Offset(32.0, 24.0), _RenderInkFeatures#1933e@Offset(32.0, 24.0), RenderCustomPaint#03bba@Offset(32.0, 24.0), RenderPhysicalShape#a7425@Offset(32.0, 24.0), RenderConstrainedBox#8a38b@Offset(32.0, 24.0), _RenderInputPadding#9c857@Offset(32.0, 24.0), RenderSemanticsAnnotations#6e877@Offset(32.0, 24.0), _RenderPortalTheater#2138c@Offset(32.0, 24.0), RenderCustomMultiChildLayoutBox#0a269@Offset(32.0, 24.0), _RenderInkFeatures#bb279@Offset(32.0, 24.0), RenderPhysicalModel#132a6@Offset(32.0, 24.0), RenderSemanticsAnnotations#b2580@Offset(32.0, 24.0), RenderRepaintBoundary#94fba@Offset(32.0, 24.0), RenderIgnorePointer#cb194@Offset(32.0, 24.0), RenderAnimatedOpacity#c831f@Offset(32.0, 24.0), RenderRepaintBoundary#3a54a@Offset(32.0, 24.0), _RenderFocusTrap#5123d@Offset(32.0, 24.0), RenderSemanticsAnnotations#a628a@Offset(32.0, 24.0), RenderOffstage#3ca42@Offset(32.0, 24.0), RenderSemanticsAnnotations#42f07@Offset(32.0, 24.0), _RenderTheatre#e8d32@Offset(32.0, 24.0), RenderSemanticsAnnotations#2304c@Offset(32.0, 24.0), RenderAbsorbPointer#78773@Offset(32.0, 24.0), RenderPointerListener#161fb@Offset(32.0, 24.0), RenderSemanticsAnnotations#253d0@Offset(32.0, 24.0), RenderSemanticsAnnotations#2222d@Offset(32.0, 24.0), RenderSemanticsAnnotations#e8831@Offset(32.0, 24.0), RenderSemanticsAnnotations#c548e@Offset(32.0, 24.0), HitTestEntry<HitTestTarget>#d6a55(RenderView#eacf8), HitTestEntry<HitTestTarget>#8dcf4(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:769:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:05 +20 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                 00:05 +20 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: if portal is not above child, we can click on both                       00:05 +21 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: if portal is not above child, we can click on both                       00:05 +21 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: alignment/size                                                           00:05 +22 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: alignment/size                                                           00:05 +22 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: defaults to fill if no anchor are specified                              00:06 +22 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: defaults to fill if no anchor are specified                              00:06 +23 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: defaults to fill if no anchor are specified                              00:06 +23 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                           00:06 +23 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                                                                                  

Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#ad7aa relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry<HitTestTarget>#f0e73(TextSpan(<all styles inherited>, "a")), RenderParagraph#41444@Offset(400.0, 300.0), RenderPointerListener#a3e99@Offset(400.0, 300.0), RenderSemanticsGestureHandler#1df33@Offset(400.0, 300.0), _RenderPortalTheater#5fffd@Offset(400.0, 300.0), HitTestEntry<HitTestTarget>#0971d(RenderView#eacf8), HitTestEntry<HitTestTarget>#0d0b4(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:992:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.


Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#57dfc relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry<HitTestTarget>#fd323(TextSpan(<all styles inherited>, "a")), RenderParagraph#f7ace@Offset(400.0, 300.0), RenderPointerListener#d2c69@Offset(400.0, 300.0), RenderSemanticsGestureHandler#5292f@Offset(400.0, 300.0), _RenderPortalTheater#5fffd@Offset(400.0, 300.0), HitTestEntry<HitTestTarget>#605e9(RenderView#eacf8), HitTestEntry<HitTestTarget>#4bb91(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:1071:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:06 +24 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                           00:06 +24 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: anchor not null then null still clicks                                   00:06 +25 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: anchor not null then null still clicks                                   00:06 +25 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals can fill the Portal                                              00:06 +26 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals can fill the Portal                                              00:06 +26 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under MaterialApp                00:06 +27 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under MaterialApp                00:06 +27 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under CupertinoApp               00:06 +28 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under CupertinoApp               00:06 +28 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: both entry and modal rebuilds within the same frame with layoutbuilder be00:06 +29 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: both entry and modal rebuilds within the same frame with layoutbuilder be00:06 +29 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry on first build                   00:06 +30 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry on first build                   00:06 +30 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry without rebuilding portl         00:06 +31 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry without rebuilding portl         00:06 +31 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles reparenting with GlobalKey                                       00:06 +31 ~1 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles reparenting with GlobalKey                                    00:06 +31 ~1 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clip overflow                                                         00:06 +31 ~2 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clip overflow                                                         00:06 +31 ~2 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can have multiple portals                                             00:06 +32 ~2 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can have multiple portals                                             00:06 +32 ~2 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click is applied in reverse order of portal addition (last click first00:06 +33 ~2 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click is applied in reverse order of portal addition (last click first00:06 +33 ~2 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals paints in order of addition (last paints last)                00:06 +34 ~2 -1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals paints in order of addition (last paints last)                00:06 +34 ~2 -1: Some tests failed. 

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

@creativecreatorormaybenot I have not found clue why this fails... Could you please have a look at it as well?

Sounds like the follower layer ends up before the leader layer.

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

All right. Now tests pass on beta channel.

(base) ➜  flutter_portal git:(fix-compile-error) ✗ fvm spawn beta test                      
Spawning version "beta"...
00:00 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:01 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:02 +0: loading /Users/tom/RefCode/flutter_portal/test/widget_test.dart                                                                       00:02 +0: loading /Users/tom/RefCode/flutter_portal/test/anchor_test.dart                                                                       00:02 +0: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Anchor is passed proper constraints                                          00:03 +0: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Anchor is passed proper constraints                                          00:03 +1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration                                   00:03 +2: /Users/tom/RefCode/flutter_portal/test/anchor_test.dart: Aligned defers to backup if needed                                           00:03 +3: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration (anchors)                         00:04 +3: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration (anchors)                         00:04 +4: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can optionally delay close with a Duration (anchors)                         00:04 +4: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles dispose before timer end                                             00:04 +5: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles dispose before timer end                                             00:04 +5: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can update portal during close                                               00:04 +6: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can update portal during close                                               00:04 +6: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can cancel leave timer by reverting visible                                  00:04 +7: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can cancel leave timer by reverting visible                                  00:04 +7: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible false > true > false resets the timer and works properly             00:04 +8: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible false > true > false resets the timer and works properly             00:04 +8: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal                                 00:04 +9: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal                                 00:04 +9: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal (anchors)                       00:04 +10: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: child does not lose state when hiding portal (anchors)                      00:04 +10: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalProvider updates child                                                00:04 +11: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalProvider updates child                                                00:04 +11: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalEntry requires portal if visible is true                              00:04 +12: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: PortalEntry requires portal if visible is true                              00:04 +12: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal required either portalBuilder or portal                              00:04 +13: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal required either portalBuilder or portal                              00:04 +13: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal synchronously add portals to PortalProvider                          00:04 +14: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal synchronously add portals to PortalProvider                          00:04 +14: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals aren't inserted if mounted is false, and visible can be changed any 00:04 +15: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals aren't inserted if mounted is false, and visible can be changed any 00:04 +15: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Unmounting Portal removes it on PortalProvider synchronously                00:04 +16: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Unmounting Portal removes it on PortalProvider synchronously                00:04 +16: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: throws if no Portal was found                                               00:04 +17: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: throws if no Portal was found                                               00:04 +17: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                                  00:05 +17: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                                  00:05 +18: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: hiding two entries at once                                                  00:05 +18: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible defaults to true                                                    00:06 +18: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible defaults to true                                                    00:06 +19: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: visible defaults to true                                                    00:06 +19: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can insert a portal without rebuilding PortalProvider at the same time      00:06 +20: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can insert a portal without rebuilding PortalProvider at the same time      00:06 +20: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                    00:06 +20: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                                                                           

Warning: A call to tap() with finder "exactly one widget with text "child" (ignoring offstage widgets): Text("child", dependencies: [MediaQuery, DefaultTextStyle])" derived an Offset (Offset(32.0, 24.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderParagraph#731ed relayoutBoundary=up15
The hit test result at that offset is: HitTestResult(RenderPointerListener#05258@Offset(32.0, 24.0), RenderSemanticsAnnotations#6dae6@Offset(32.0, 24.0), RenderMouseRegion#afbb8@Offset(32.0, 24.0), RenderSemanticsAnnotations#2ddd9@Offset(32.0, 24.0), _RenderInkFeatures#2c901@Offset(32.0, 24.0), RenderCustomPaint#ad293@Offset(32.0, 24.0), RenderPhysicalShape#aac44@Offset(32.0, 24.0), RenderConstrainedBox#3f52d@Offset(32.0, 24.0), _RenderInputPadding#5e084@Offset(32.0, 24.0), RenderSemanticsAnnotations#63ad3@Offset(32.0, 24.0), _RenderPortalTheater#c7a0b@Offset(32.0, 24.0), RenderCustomMultiChildLayoutBox#a5758@Offset(32.0, 24.0), _RenderInkFeatures#9d62a@Offset(32.0, 24.0), RenderPhysicalModel#a21c2@Offset(32.0, 24.0), RenderSemanticsAnnotations#dc924@Offset(32.0, 24.0), RenderRepaintBoundary#7ee11@Offset(32.0, 24.0), RenderIgnorePointer#85450@Offset(32.0, 24.0), RenderAnimatedOpacity#be429@Offset(32.0, 24.0), RenderRepaintBoundary#b9e35@Offset(32.0, 24.0), _RenderFocusTrap#6e8ea@Offset(32.0, 24.0), RenderSemanticsAnnotations#705b1@Offset(32.0, 24.0), RenderOffstage#7a8a3@Offset(32.0, 24.0), RenderSemanticsAnnotations#5b2a7@Offset(32.0, 24.0), _RenderTheatre#b6dda@Offset(32.0, 24.0), RenderSemanticsAnnotations#be875@Offset(32.0, 24.0), RenderAbsorbPointer#d1597@Offset(32.0, 24.0), RenderPointerListener#c8ed0@Offset(32.0, 24.0), RenderSemanticsAnnotations#c324e@Offset(32.0, 24.0), RenderSemanticsAnnotations#3fca8@Offset(32.0, 24.0), RenderSemanticsAnnotations#dde54@Offset(32.0, 24.0), RenderSemanticsAnnotations#49d81@Offset(32.0, 24.0), HitTestEntry<HitTestTarget>#c4657(RenderView#c9ef5), HitTestEntry<HitTestTarget>#a5223(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:769:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:06 +21: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                    00:06 +21: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: if portal is not above child, we can click on both                          00:06 +22: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: if portal is not above child, we can click on both                          00:06 +22: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: alignment/size                                                              00:06 +23: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: alignment/size                                                              00:06 +23: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: defaults to fill if no anchor are specified                                 00:06 +24: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: defaults to fill if no anchor are specified                                 00:06 +24: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                              00:06 +24: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                                                                                     

Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#16782 relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry<HitTestTarget>#be333(TextSpan(<all styles inherited>, "a")), RenderParagraph#f950d@Offset(400.0, 300.0), RenderPointerListener#8e9c1@Offset(400.0, 300.0), RenderSemanticsGestureHandler#b0d13@Offset(400.0, 300.0), _RenderPortalTheater#9b698@Offset(400.0, 300.0), HitTestEntry<HitTestTarget>#c744f(RenderView#c9ef5), HitTestEntry<HitTestTarget>#def5c(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:992:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.


Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#09e14 relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry<HitTestTarget>#b1771(TextSpan(<all styles inherited>, "a")), RenderParagraph#5f9af@Offset(400.0, 300.0), RenderPointerListener#99882@Offset(400.0, 300.0), RenderSemanticsGestureHandler#bcfba@Offset(400.0, 300.0), _RenderPortalTheater#9b698@Offset(400.0, 300.0), HitTestEntry<HitTestTarget>#a91b3(RenderView#c9ef5), HitTestEntry<HitTestTarget>#a1ff4(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:1071:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:06 +25: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                              00:06 +25: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: anchor not null then null still clicks                                      00:06 +26: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: anchor not null then null still clicks                                      00:06 +26: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals can fill the Portal                                                 00:06 +27: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals can fill the Portal                                                 00:06 +27: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under MaterialApp                   00:06 +28: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under MaterialApp                   00:06 +28: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under CupertinoApp                  00:06 +29: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: Portal can be added above navigator but under CupertinoApp                  00:06 +29: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: both entry and modal rebuilds within the same frame with layoutbuilder betwe00:06 +30: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: both entry and modal rebuilds within the same frame with layoutbuilder betwe00:06 +30: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry on first build                      00:06 +31: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry on first build                      00:06 +31: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry without rebuilding portl            00:06 +32: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: layout builder between portal and entry without rebuilding portl            00:06 +32: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles reparenting with GlobalKey                                          00:06 +32 ~1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: handles reparenting with GlobalKey                                       00:06 +32 ~1: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clip overflow                                                            00:06 +32 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clip overflow                                                            00:06 +32 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can have multiple portals                                                00:06 +33 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: can have multiple portals                                                00:06 +33 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click is applied in reverse order of portal addition (last click first)  00:06 +34 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click is applied in reverse order of portal addition (last click first)  00:06 +34 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals paints in order of addition (last paints last)                   00:06 +35 ~2: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: portals paints in order of addition (last paints last)                   00:06 +35 ~2: All tests passed!     

And the stable channel:

(base) ➜  flutter_portal git:(fix-compile-error) flutter pub get && flutter test
Running "flutter pub get" in flutter_portal...                     874ms
Running "flutter pub get" in example...                          1,147ms
00:17 +20: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: clicking on portal if above child clicks only the portal                   

Warning: A call to tap() with finder "exactly one widget with text "child" (ignoring offstage widgets): Text("child", dependencies: [MediaQuery, DefaultTextStyle])" derived an Offset (Offset(32.0, 24.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderParagraph#49df5 relayoutBoundary=up15
The hit test result at that offset is: HitTestResult(RenderPointerListener#d8c5e@Offset(32.0, 24.0), RenderSemanticsAnnotations#7dcb9@Offset(32.0, 24.0), RenderMouseRegion#4aae6@Offset(32.0, 24.0), RenderSemanticsAnnotations#e6832@Offset(32.0, 24.0), _RenderInkFeatures#2afbd@Offset(32.0, 24.0), RenderCustomPaint#ce441@Offset(32.0, 24.0), RenderPhysicalShape#37cf1@Offset(32.0, 24.0), RenderConstrainedBox#36346@Offset(32.0, 24.0), _RenderInputPadding#f9551@Offset(32.0, 24.0), RenderSemanticsAnnotations#b0044@Offset(32.0, 24.0), _RenderPortalTheater#a5cb9@Offset(32.0, 24.0), RenderCustomMultiChildLayoutBox#0ee7e@Offset(32.0, 24.0), _RenderInkFeatures#31e00@Offset(32.0, 24.0), RenderPhysicalModel#b30f3@Offset(32.0, 24.0), RenderSemanticsAnnotations#c92e2@Offset(32.0, 24.0), RenderRepaintBoundary#12f44@Offset(32.0, 24.0), RenderIgnorePointer#b533b@Offset(32.0, 24.0), RenderAnimatedOpacity#0f1e6@Offset(32.0, 24.0), RenderRepaintBoundary#ebd9e@Offset(32.0, 24.0), _RenderFocusTrap#1490e@Offset(32.0, 24.0), RenderSemanticsAnnotations#356e2@Offset(32.0, 24.0), RenderOffstage#f88af@Offset(32.0, 24.0), RenderSemanticsAnnotations#c0762@Offset(32.0, 24.0), _RenderTheatre#5acd0@Offset(32.0, 24.0), RenderSemanticsAnnotations#b8632@Offset(32.0, 24.0), RenderAbsorbPointer#813ce@Offset(32.0, 24.0), RenderPointerListener#a699e@Offset(32.0, 24.0), RenderSemanticsAnnotations#c9a05@Offset(32.0, 24.0), RenderSemanticsAnnotations#3e5fd@Offset(32.0, 24.0), RenderSemanticsAnnotations#31315@Offset(32.0, 24.0), RenderSemanticsAnnotations#8f550@Offset(32.0, 24.0), HitTestEntry#e05ef(RenderView#0f184), HitTestEntry#7ada6(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:769:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:17 +24: /Users/tom/RefCode/flutter_portal/test/widget_test.dart: click works when switching between anchor/fill                             

Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#b144a relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry#c2142(TextSpan(<all styles inherited>, "a")), RenderParagraph#905d6@Offset(400.0, 300.0), RenderPointerListener#3da0d@Offset(400.0, 300.0), RenderSemanticsGestureHandler#194c7@Offset(400.0, 300.0), _RenderPortalTheater#3bd37@Offset(400.0, 300.0), HitTestEntry#84680(RenderView#0f184), HitTestEntry#f662d(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:992:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.


Warning: A call to tap() with finder "exactly one widget with key [<'child'>] (ignoring offstage widgets): GestureDetector-[<'child'>](startBehavior: start)" derived an Offset (Offset(400.0, 300.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot receive pointer events.
The finder corresponds to this RenderBox: RenderSemanticsGestureHandler#e3b50 relayoutBoundary=up2
The hit test result at that offset is: HitTestResult(HitTestEntry#8ba42(TextSpan(<all styles inherited>, "a")), RenderParagraph#2515b@Offset(400.0, 300.0), RenderPointerListener#6de56@Offset(400.0, 300.0), RenderSemanticsGestureHandler#ae3ed@Offset(400.0, 300.0), _RenderPortalTheater#3bd37@Offset(400.0, 300.0), HitTestEntry#224fd(RenderView#0f184), HitTestEntry#948f9(<AutomatedTestWidgetsFlutterBinding>))
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:956:25)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:839:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      main.<anonymous closure> (file:///Users/tom/RefCode/flutter_portal/test/widget_test.dart:1071:18)
<asynchronous suspension>
#4      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125:47)
<asynchronous suspension>
To silence this warning, pass "warnIfMissed: false" to "tap()".
To make this warning fatal, set WidgetController.hitTestWarningShouldBeFatal to true.

00:18 +35 ~2: All tests passed!

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

Lesson: Flutter beta's code is very, very different from Flutter stable's code.

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

@creativecreatorormaybenot Btw, the experience above shows that, even if we make that cherry pick, Flutter Portal still cannot be working on stable branch, until next major release! (I did not expected that)

But now it works on stable :)

@creativecreatorormaybenot
Copy link
Contributor

Btw, the experience above shows that, even if we make that cherry pick, Flutter Portal still cannot be working on stable branch, until next major release! (I did not expected that)

@fzyzcjy that is not right. Cherrypicks are included with the next patch - that is the idea behind them.

@creativecreatorormaybenot
Copy link
Contributor

@fzyzcjy I would suggest not rolling this workaround and instead waiting on the CP request review. If it is denied, we can still merge this.

Another option would be to temporarily rollback #44 and publish it with the next stable version.

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

@fzyzcjy that is not right. Cherrypicks are included with the next patch - that is the idea behind them.

@creativecreatorormaybenot Well, from what I have experimented above, the thing is:

  1. original code + stable 2.10 => success
  2. New Anchoring Logic for Advanced Use Cases #44 + stable 2.10 => compile error
  3. New Anchoring Logic for Advanced Use Cases #44 + beta => ok
  4. New Anchoring Logic for Advanced Use Cases #44 + copy-and-paste-and-modify from stable 2.10 => test error (!)
  5. New Anchoring Logic for Advanced Use Cases #44 + copy-and-paste-and-modify from beta => ok

So, if that cherry-pick is done, we are in a situation similar to case 4, instead of case 5. In that case, test still errors.

In addition I am going to implement new features, and want to based on your great PR :)

I just merge it now, and if there are problems, we can discuss and revert if needed.

@fzyzcjy fzyzcjy merged commit 6cf8efd into master Mar 7, 2022
@creativecreatorormaybenot
Copy link
Contributor

@fzyzcjy in that case, I suppose we should be fine as long as you remember to remvoe flutter_src/ again :)

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

@creativecreatorormaybenot Sure :)

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

Or, maybe we should keep it in our source tree. Because, for example, suppose flutter 2.12 (say) is released, but someone is using flutter 2.10 on their computer. Then, if we use the Flutter built-in code, then we are in trouble (case 4 in above).

@creativecreatorormaybenot
Copy link
Contributor

Or, maybe we should keep it in our source tree. Because, for example, suppose flutter 2.12 (say) is released, but someone is using flutter 2.10 on their computer. Then, if we use the Flutter built-in code, then we are in trouble (case 4 in above).

We should ignore this case. If they are upgrading a package, we can expect them to run the latest stable version.

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 7, 2022

@creativecreatorormaybenot Well indeed maybe not expect everyone... I have seen many people using old versions and cannot upgrade due to, e.g. internal changes to frameworks; or they want high stability - you know, flutter 2.x.0 is usually really not that stable IMHO...

@creativecreatorormaybenot
Copy link
Contributor

@fzyzcjy I am pretty sure the guideline for packages is sticking to the stable channel.

At leat that is what many popular packages do.

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Mar 8, 2022

@creativecreatorormaybenot Agree. Then I will do that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants