Skip to content

Commit

Permalink
feat: NavigatorPushBeginHandle url redirect takes effect immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
foxsofter committed Sep 5, 2024
1 parent f063c3a commit 1d1c2b3
Show file tree
Hide file tree
Showing 3 changed files with 11 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.17.1

- feat: NavigatorPushBeginHandle url redirect takes effect immediately

## 4.17.0

- feat: support redirect by NavigatorPushBeginHandle
Expand Down
8 changes: 6 additions & 2 deletions lib/src/navigator/thrio_navigator_implement.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,12 @@ class ThrioNavigatorImplement {
final reversed = _pushBeginHandlers.reversed;
var newURL = url;
for (final handle in reversed) {
final ret = await handle(url,
params: params, fromURL: fromURL, innerURL: innerURL);
final ret = await handle(
newURL,
params: params,
fromURL: fromURL,
innerURL: innerURL,
);
if (ret != null) {
newURL = ret;
}
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.17.0
version: 4.17.1
homepage: https://github.com/flutter-thrio/flutter_thrio

environment:
Expand Down

0 comments on commit 1d1c2b3

Please sign in to comment.