diff --git a/packages/go_router/test/information_provider_test.dart b/packages/go_router/test/information_provider_test.dart index d47a64520c06..2bdb0e6178f9 100644 --- a/packages/go_router/test/information_provider_test.dart +++ b/packages/go_router/test/information_provider_test.dart @@ -82,6 +82,7 @@ void main() { initialLocation: initialRoute, initialExtra: null, routerNeglect: true); + addTearDown(provider.dispose); provider.addListener(expectAsync0(() {})); provider.go(newRoute); provider.routerReportsNewRouteInformation( @@ -98,6 +99,7 @@ void main() { late final GoRouteInformationProvider provider = GoRouteInformationProvider( initialLocation: initialRoute, initialExtra: null); + addTearDown(provider.dispose); provider.addListener(expectAsync0(() {})); provider.go(newRoute); provider.routerReportsNewRouteInformation(