From 4e792d9db55f42063fe0ca401fb03971aba9a164 Mon Sep 17 00:00:00 2001 From: pietroid Date: Wed, 12 Mar 2025 11:14:53 -0300 Subject: [PATCH] chore!: remove deprecated parameter --- lib/src/matchers.dart | 7 ------- test/src/matchers_test.dart | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/lib/src/matchers.dart b/lib/src/matchers.dart index 9712a00..43646de 100644 --- a/lib/src/matchers.dart +++ b/lib/src/matchers.dart @@ -18,19 +18,12 @@ import 'package:test/test.dart'; /// /// ``` Matcher isRoute({ - @Deprecated('Use `whereName` instead') String? named, Matcher? whereSettings, Matcher? whereName, Matcher? whereArguments, Matcher? whereMaintainState, Matcher? whereFullscreenDialog, }) { - // Remove once `named` argument is removed. - if (whereName == null && named != null) { - // ignore: parameter_assignments - whereName = equals(named); - } - assert( whereSettings == null || (whereName == null && whereArguments == null), 'Cannot specify both `whereSettings` and `whereName` or `whereArguments`', diff --git a/test/src/matchers_test.dart b/test/src/matchers_test.dart index d640800..1a06379 100644 --- a/test/src/matchers_test.dart +++ b/test/src/matchers_test.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:matcher/src/feature_matcher.dart'; import 'package:mockingjay/mockingjay.dart'; class NonModalRoute extends Mock implements TransitionRoute {} @@ -49,19 +48,6 @@ void main() { } group('constructor', () { - test('wraps deprecated name value in equals matcher', () { - expect( - // ignore: deprecated_member_use_from_same_package - isRoute(named: '/test'), - isA().having( - // ignore: avoid_dynamic_calls - (dynamic m) => m.whereName, - 'whereName', - isA>(), - ), - ); - }); - test( 'throws AssertionError when both whereSettings ' 'and whereName or whereArguments matchers are provided',