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: