From 4ce9856d947acb346def98940e8af12ed23a50b2 Mon Sep 17 00:00:00 2001 From: foxsofter Date: Fri, 7 Jun 2024 16:02:57 +0800 Subject: [PATCH] fix: _isSelectedOf and _isPushedOf get error --- CHANGELOG.md | 4 ++++ lib/src/navigator/navigator_route_settings.dart | 6 +++--- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 525f877..3665b33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.15.4 + +- fix: `_isSelectedOf` and `_isPushedOf` get error + ## 4.15.3 - fix: url is missing / at the beginning diff --git a/lib/src/navigator/navigator_route_settings.dart b/lib/src/navigator/navigator_route_settings.dart index 55289d5..2581fcc 100644 --- a/lib/src/navigator/navigator_route_settings.dart +++ b/lib/src/navigator/navigator_route_settings.dart @@ -136,7 +136,7 @@ extension NavigatorRouteSettings on RouteSettings { /// Indicates whether this route is generated by build /// - bool get isBuilt => _isBuiltOf[name!] ?? false; + bool get isBuilt => _isBuiltOf[this] ?? false; set isBuilt(bool built) { _isBuiltOf[this] = built; @@ -144,7 +144,7 @@ extension NavigatorRouteSettings on RouteSettings { /// Indicates whether this route is generated by push /// - bool get isPushed => _isPushedOf[name!] ?? false; + bool get isPushed => _isPushedOf[this] ?? false; set isPushed(bool pushed) { _isPushedOf[this] = pushed; @@ -156,7 +156,7 @@ extension NavigatorRouteSettings on RouteSettings { if (!isBuilt) { return null; } - return _isSelectedOf[name!]; + return _isSelectedOf[this]; } set isSelected(bool? selected) { diff --git a/pubspec.yaml b/pubspec.yaml index fb8f1d6..61749f7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.15.3 +version: 4.15.4 homepage: https://github.com/flutter-thrio/flutter_thrio environment: