Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit d4a02b4

Browse files
author
guanghuispark
committed
fix pushReplacementNamed<T,TO>
1 parent 6e70612 commit d4a02b4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

com.unity.uiwidgets/Runtime/widgets/navigator.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,7 @@ public Route _routeNamed(string name, object arguments, bool allowNull = false)
16331633
return route;
16341634
}
16351635

1636-
public Route<T> _routeNamed<T>(string name, object arguments, bool allowNull = false) {
1636+
public Route _routeNamed<T>(string name, object arguments, bool allowNull = false) {
16371637
D.assert(!_debugLocked);
16381638
D.assert(name != null);
16391639
if (allowNull && widget.onGenerateRoute == null)
@@ -1657,8 +1657,7 @@ public Route<T> _routeNamed<T>(string name, object arguments, bool allowNull = f
16571657
arguments: arguments
16581658
);
16591659

1660-
var routeee = widget.onGenerateRoute(settings);
1661-
Route<T> route = routeee as Route<T>;
1660+
Route route = widget.onGenerateRoute(settings);
16621661
if (route == null && !allowNull) {
16631662
D.assert(() => {
16641663
if (widget.onUnknownRoute == null) {
@@ -1811,7 +1810,7 @@ void _afterNavigation(Route route) {
18111810

18121811

18131812

1814-
public Future<T> pushReplacement<T, TO>(Route<T> newRoute, TO result) {
1813+
public Future<T> pushReplacement<T, TO>(Route newRoute, TO result) {
18151814
D.assert(!_debugLocked);
18161815
D.assert(() => {
18171816
_debugLocked = true;
@@ -1882,7 +1881,7 @@ public Future pushReplacement(Route newRoute, object result) {
18821881
}
18831882

18841883

1885-
public Future<T> pushAndRemoveUntil<T>(Route<T> newRoute, RoutePredicate predicate) {
1884+
public Future<T> pushAndRemoveUntil<T>(Route newRoute, RoutePredicate predicate) {
18861885
D.assert(!_debugLocked);
18871886
D.assert(() => {
18881887
_debugLocked = true;

0 commit comments

Comments
 (0)