A package that makes it easy to mock, test, and verify navigation in Flutter. Created by Very Good Ventures 🦄
This breaking change now requires users to mock the canPop
method since it is being used internally by Flutter 3.16.0 (see https://github.com/flutter/flutter/pull/132249).
final navigator = MockNavigator();
when(navigator.canPop).thenReturn(true); // New, previously not always required.
In addition, if you were verifying the canPop
calls you should now expect an additional call.
verify(() => navigator.canPop()).called(1); // New, previously not always required.
await tester.tap(find.byType(TextButton));
verify(() => navigator.canPop()).called(1)
mocktail ^1.0.0
flutter 3.13.0
mocktail ^0.3.0
mocktail ^0.3.0
canPop
(thanks @allisonryan0002!)maybePop
(thanks @korzonkiee!)whereSettings
, whereName
, whereArguments
, whereMaintainState
and whereFullscreenDialog
matcher arguments to isRoute
matchernamed
argument on isRoute
deprecated in favor of whereName
maybePop
(thanks @korzonkiee!)whereSettings
, whereName
, whereArguments
, whereMaintainState
and whereFullscreenDialog
matcher arguments to isRoute
matchernamed
argument on isRoute
deprecated in favor of whereName
This is the last release compatible with mockito.