anchor.diff:        expect(
           bounds,
           Rect.fromCenter(
  -          center: viewSizeLogical.center(Offset.zero),
  +          center: viewSize.center(Offset.zero),
             width: _TestOffset.detectorWidth,
             height: _TestOffset.detectorHeight,
           ),
  
positive.code: }
  
  // Simulates a screen rotation by swapping the screen width and height.
  Future<void> _simulateScreenRotation(WidgetTester tester) {
    final oldViewSizePixels = tester.binding.window.physicalSize;
    final newViewSizePixels =
        Size(oldViewSizePixels.height, oldViewSizePixels.width);
  
    // The typical way to simulate a screen rotation is to wrap the widget tree
    // in a [SizedBox] and change its dimensions.  However, empirical testing
  
negative.code:     'VisibilityDetector computes widget bounds in global coordinates',
      widget: _TestOffset(key: _testOffsetKey),
      callback: (tester) async {
        final viewSize = tester.binding.renderView?.size;
        assert(viewSize != null);
  
        final bounds =
            VisibilityDetectorController.instance.widgetBoundsFor(_testOffsetKey);
  