Skip to content

Use NavigatorState in progress dialog callbacks#19

Merged
thenixan merged 1 commit into
mainfrom
npe-with-dismissed-context
Mar 17, 2026
Merged

Use NavigatorState in progress dialog callbacks#19
thenixan merged 1 commit into
mainfrom
npe-with-dismissed-context

Conversation

@thenixan

Copy link
Copy Markdown
Contributor

Pass NavigatorState into _callback and call navigator.removeRoute instead of depending on a possibly unmounted BuildContext. Capture navigator.context for theming and push routes via that navigator. Check route.isActive (not context.mounted) so removing a nested navigator while a task is in-flight does not leave push() resolving null. Add a regression test for the nested-navigator removal case. Update example/pubspec.lock package versions and Dart SDK bound.

Pass NavigatorState into _callback and call navigator.removeRoute
instead of depending on a possibly unmounted BuildContext. Capture
navigator.context for theming and push routes via that navigator.
Check route.isActive (not context.mounted) so removing a nested
navigator while a task is in-flight does not leave push() resolving
null. Add a regression test for the nested-navigator removal case.
Update example/pubspec.lock package versions and Dart SDK bound.
@thenixan thenixan merged commit 650e335 into main Mar 17, 2026
3 checks passed
@thenixan thenixan deleted the npe-with-dismissed-context branch March 17, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant