Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:very_good_analysis/analysis_options.6.0.0.yaml
include: package:very_good_analysis/analysis_options.7.0.0.yaml
2 changes: 1 addition & 1 deletion lib/mockingjay.dart
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
3 changes: 2 additions & 1 deletion lib/src/matchers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Matcher isRoute<T extends Object?>({
}) {
// Remove once `named` argument is removed.
if (whereName == null && named != null) {
// Deprecation will be removed with https://github.com/VeryGoodOpenSource/mockingjay/pull/86
// ignore: parameter_assignments
whereName = equals(named);
Comment thread
pietroid marked this conversation as resolved.
Outdated
}
Expand Down Expand Up @@ -94,7 +95,7 @@ class _RouteMatcher<T> extends Matcher {
hasMaintainStateMatcher ||
hasFullscreenDialogMatcher;

/// Takes an [input] string that looks like "FooBarRoute<MyType>" and extracts
/// Takes an [input] string that looks like `FooBarRoute<MyType>` and extracts
/// the part "MyType".
Comment thread
pietroid marked this conversation as resolved.
Outdated
///
/// If the `Route<` part cannot be found, it returns the input string
Expand Down
2 changes: 1 addition & 1 deletion lib/src/mock_navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class _MockMaterialPageRoute extends MaterialPageRoute<void> {
// 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;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ dependencies:
test: ^1.25.7

dev_dependencies:
very_good_analysis: ^6.0.0
very_good_analysis: ^7.0.0
2 changes: 2 additions & 0 deletions test/src/matchers_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ void main() {
group('constructor', () {
test('wraps deprecated name value in equals matcher', () {
expect(
// Deprecation will be removed with https://github.com/VeryGoodOpenSource/mockingjay/pull/86
// ignore: deprecated_member_use_from_same_package
isRoute(named: '/test'),
isA<dynamic>().having(
// Deprecation will be removed with https://github.com/VeryGoodOpenSource/mockingjay/pull/86
// ignore: avoid_dynamic_calls
(dynamic m) => m.whereName,
'whereName',
Expand Down