diff --git a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/google_maps_test.dart b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/google_maps_test.dart index 35351505e495..9246466d00cf 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/integration_test/google_maps_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter/example/integration_test/google_maps_test.dart @@ -426,7 +426,12 @@ void main() { }); testWidgets('testInitialCenterLocationAtCenter', (WidgetTester tester) async { - await tester.binding.setSurfaceSize(const Size(800.0, 600.0)); + // TODO(bparrishMines): Remove this line when resizing virtual displays doesn't + // clamp displays that are smaller than the screen. + // See https://github.com/flutter/flutter/issues/106750 + AndroidGoogleMapsFlutter.useAndroidViewSurface = true; + await tester.binding.setSurfaceSize(const Size(800, 600)); + final Completer mapControllerCompleter = Completer(); final Key key = GlobalKey(); @@ -473,6 +478,7 @@ void main() { .round()); } await tester.binding.setSurfaceSize(null); + AndroidGoogleMapsFlutter.useAndroidViewSurface = false; }); testWidgets('testGetVisibleRegion', (WidgetTester tester) async {