Skip to content

Commit

Permalink
fix: NavigatorRoute type cast error in NavigatorObserverManager.didRe…
Browse files Browse the repository at this point in the history
…move
  • Loading branch information
foxsofter committed Mar 27, 2024
1 parent f4c05f2 commit 1d06a11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.9.1

- fix: NavigatorRoute type cast error in NavigatorObserverManager.didRemove

## 4.9.0

- feat: add push return handle
Expand Down
6 changes: 4 additions & 2 deletions lib/src/navigator/navigator_observer_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ class NavigatorObserverManager extends NavigatorObserver {
NavigatorRouteType.popTo,
);
}
// ignore: avoid_as
(pageRoutes.last as NavigatorRoute).routeType = null;
final last = pageRoutes.last;
if (last is NavigatorRoute) {
last.routeType = null;
}
}

_currenPopRouteCallbackAndClear(_currentRemoveRoutes);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_thrio
description: Thrio makes it easy and fast to add flutter to existing mobile applications, and provide a simple and consistent navigator APIs.
version: 4.9.0
version: 4.9.1
homepage: https://github.com/flutter-thrio/flutter_thrio

environment:
Expand Down

0 comments on commit 1d06a11

Please sign in to comment.