diff --git a/analysis_options.yaml b/analysis_options.yaml index bb72091..c2f4cbb 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1 +1 @@ -include: package:very_good_analysis/analysis_options.6.0.0.yaml +include: package:very_good_analysis/analysis_options.7.0.0.yaml diff --git a/lib/mockingjay.dart b/lib/mockingjay.dart index 997aaab..55cb951 100644 --- a/lib/mockingjay.dart +++ b/lib/mockingjay.dart @@ -1,6 +1,6 @@ /// A package that makes it easy to mock, test and verify /// navigation calls in Flutter. -library mockingjay; +library; export 'package:mocktail/mocktail.dart'; diff --git a/lib/src/matchers.dart b/lib/src/matchers.dart index 9712a00..01f1cd8 100644 --- a/lib/src/matchers.dart +++ b/lib/src/matchers.dart @@ -27,6 +27,7 @@ Matcher isRoute({ }) { // Remove once `named` argument is removed. if (whereName == null && named != null) { + // Reassigning it to the parameter to make the code flow nicer. // ignore: parameter_assignments whereName = equals(named); } @@ -94,7 +95,7 @@ class _RouteMatcher extends Matcher { hasMaintainStateMatcher || hasFullscreenDialogMatcher; - /// Takes an [input] string that looks like "FooBarRoute" and extracts + /// Takes an [input] string that looks like `FooBarRoute` and extracts /// the part "MyType". /// /// If the `Route<` part cannot be found, it returns the input string diff --git a/lib/src/mock_navigator.dart b/lib/src/mock_navigator.dart index ad31c4c..36de874 100644 --- a/lib/src/mock_navigator.dart +++ b/lib/src/mock_navigator.dart @@ -17,7 +17,7 @@ class _MockMaterialPageRoute extends MaterialPageRoute { // By the time the setState is called, the attribute is already set // so we just ignore the error and the hack will do its job. state.insert(entry); - } catch (_) {} + } on Object catch (_) {} // Set mounted back to false to make sure the state doesn't get // marked as dirty during OverlayEntry.remove(). state._mounted = false; diff --git a/pubspec.yaml b/pubspec.yaml index a727178..49dce7d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,4 +17,4 @@ dependencies: test: ^1.25.7 dev_dependencies: - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/test/src/matchers_test.dart b/test/src/matchers_test.dart index d640800..4633115 100644 --- a/test/src/matchers_test.dart +++ b/test/src/matchers_test.dart @@ -51,9 +51,11 @@ void main() { group('constructor', () { test('wraps deprecated name value in equals matcher', () { expect( + // Specifically testing deprecated member here // ignore: deprecated_member_use_from_same_package isRoute(named: '/test'), isA().having( + // Expecting Dynamic here // ignore: avoid_dynamic_calls (dynamic m) => m.whereName, 'whereName',