From d095f10b443c9b59e77510c72994e7aca37b5b76 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 6 Jun 2023 09:23:14 -0700 Subject: [PATCH] Use a `show` over a `hide` for `test_api` exports (#128298) The members which are currently hidden may get removed from `package:test_api` because they have no uses. https://github.com/dart-lang/test/pull/2030 Switch to a `show` and list all the exported APIs. This is currently a no-op change, and is forward compatible with the breaking change when it lands. A `show` is also safer than a `hide` when exporting across package boundaries. Adding a new member to a library _can be_ breaking, but is often treated as non-breaking. If a new member is added to `package:test_api/scaffolding.dart` it will need to be manually added to the list to be usable from `package:flutter_test`, but we anyways want to add a CHANGELOG entry for user facing changes. --- packages/flutter_test/lib/src/widget_tester.dart | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/flutter_test/lib/src/widget_tester.dart b/packages/flutter_test/lib/src/widget_tester.dart index 4708b7f831..0a26dfc9bd 100644 --- a/packages/flutter_test/lib/src/widget_tester.dart +++ b/packages/flutter_test/lib/src/widget_tester.dart @@ -47,7 +47,20 @@ export 'package:matcher/expect.dart' hide expect, isInstanceOf; // that doesn't apply here. export 'package:test_api/hooks.dart' show TestFailure; export 'package:test_api/scaffolding.dart' - hide group, setUp, setUpAll, tearDown, tearDownAll, test; + show + OnPlatform, + Retry, + Skip, + Tags, + TestOn, + Timeout, + addTearDown, + markTestSkipped, + printOnFailure, + pumpEventQueue, + registerException, + spawnHybridCode, + spawnHybridUri; /// Signature for callback to [testWidgets] and [benchmarkWidgets]. typedef WidgetTesterCallback = Future Function(WidgetTester widgetTester);