From a6d38b5ce53242601ccec4576d47710acd5a5f69 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 22 Mar 2023 16:16:57 -0700 Subject: [PATCH] Migrate away from to-be-deprecated APIs --- .../go_router/example/test/path_and_query_params_test.dart | 4 ++-- packages/go_router/example/test/redirection_test.dart | 4 ++-- packages/go_router/test/go_router_test.dart | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/go_router/example/test/path_and_query_params_test.dart b/packages/go_router/example/test/path_and_query_params_test.dart index b59c8c844077..e4af48b7baee 100644 --- a/packages/go_router/example/test/path_and_query_params_test.dart +++ b/packages/go_router/example/test/path_and_query_params_test.dart @@ -18,7 +18,7 @@ void main() { ByteData message = const JSONMethodCodec().encodeMethodCall( MethodCall('pushRouteInformation', testRouteInformation), ); - await ServicesBinding.instance.defaultBinaryMessenger + await tester.binding.defaultBinaryMessenger .handlePlatformMessage('flutter/navigation', message, (_) {}); await tester.pumpAndSettle(); @@ -34,7 +34,7 @@ void main() { message = const JSONMethodCodec().encodeMethodCall( MethodCall('pushRouteInformation', testRouteInformation), ); - await ServicesBinding.instance.defaultBinaryMessenger + await tester.binding.defaultBinaryMessenger .handlePlatformMessage('flutter/navigation', message, (_) {}); await tester.pumpAndSettle(); diff --git a/packages/go_router/example/test/redirection_test.dart b/packages/go_router/example/test/redirection_test.dart index 21a366eaa628..2d0e286ed3b9 100644 --- a/packages/go_router/example/test/redirection_test.dart +++ b/packages/go_router/example/test/redirection_test.dart @@ -19,7 +19,7 @@ void main() { ByteData message = const JSONMethodCodec().encodeMethodCall( MethodCall('pushRouteInformation', testRouteInformation), ); - await ServicesBinding.instance.defaultBinaryMessenger + await tester.binding.defaultBinaryMessenger .handlePlatformMessage('flutter/navigation', message, (_) {}); await tester.pumpAndSettle(); @@ -36,7 +36,7 @@ void main() { message = const JSONMethodCodec().encodeMethodCall( MethodCall('pushRouteInformation', testRouteInformation), ); - await ServicesBinding.instance.defaultBinaryMessenger + await tester.binding.defaultBinaryMessenger .handlePlatformMessage('flutter/navigation', message, (_) {}); await tester.pumpAndSettle(); diff --git a/packages/go_router/test/go_router_test.dart b/packages/go_router/test/go_router_test.dart index 17335136bd76..fdfc9afc89e7 100644 --- a/packages/go_router/test/go_router_test.dart +++ b/packages/go_router/test/go_router_test.dart @@ -28,7 +28,7 @@ Future sendPlatformUrl(String url) async { final ByteData message = const JSONMethodCodec().encodeMethodCall( MethodCall('pushRouteInformation', testRouteInformation), ); - await ServicesBinding.instance.defaultBinaryMessenger + await tester.binding.defaultBinaryMessenger .handlePlatformMessage('flutter/navigation', message, (_) {}); }