|
|
|
|
|
|
return of(context).pushNamed(routeName, arguments: arguments); |
|
|
|
} |
|
|
|
|
|
|
|
public static Future<T> pushReplacementNamed<T,TO>(BuildContext context, string routeName, |
|
|
|
TO result = default , object arguments = null) { |
|
|
|
return of(context).pushReplacementNamed<T,TO>(routeName, arguments: arguments,result: result); |
|
|
|
public static Future pushReplacementNamed(BuildContext context, string routeName, |
|
|
|
object result = default , object arguments = null) { |
|
|
|
return of(context).pushReplacementNamed(routeName, arguments: arguments,result: result); |
|
|
|
public static Future<T> popAndPushNamed<T,TO>(BuildContext context, string routeName, |
|
|
|
TO result = default, |
|
|
|
public static Future popAndPushNamed(BuildContext context, string routeName, |
|
|
|
object result = default, |
|
|
|
return of(context).popAndPushNamed<T,TO>(routeName, result: result, arguments: arguments); |
|
|
|
return of(context).popAndPushNamed(routeName, result: result, arguments: arguments); |
|
|
|
} |
|
|
|
|
|
|
|
public static Future<T> pushNamedAndRemoveUntil<T>(BuildContext context, string newRouteName, |
|
|
|
|
|
|
return of(context).push<T>(route); |
|
|
|
} |
|
|
|
|
|
|
|
public static Future<T> pushReplacement<T,TO>(BuildContext context, Route<T> newRoute, TO result = default ) { |
|
|
|
return of(context).pushReplacement<T,TO>(newRoute, result); |
|
|
|
public static Future pushReplacement(BuildContext context, Route newRoute, object result = default ) { |
|
|
|
return of(context).pushReplacement(newRoute, result); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arguments: arguments |
|
|
|
); |
|
|
|
|
|
|
|
var routeee = widget.onGenerateRoute(settings); |
|
|
|
var routeee = (Route) widget.onGenerateRoute(settings); |
|
|
|
Route<T> route = routeee as Route<T>; |
|
|
|
if (route == null && !allowNull) { |
|
|
|
D.assert(() => { |
|
|
|
|
|
|
return push(_routeNamed(routeName, arguments: arguments)); |
|
|
|
} |
|
|
|
|
|
|
|
public Future<T> pushReplacementNamed<T, TO>( |
|
|
|
public Future pushReplacementNamed( |
|
|
|
TO result = default, |
|
|
|
object result = default, |
|
|
|
return pushReplacement<T, TO>(_routeNamed<T>(routeName, arguments: arguments), result: result); |
|
|
|
return pushReplacement(_routeNamed(routeName, arguments: arguments), result: result); |
|
|
|
public Future<T> popAndPushNamed<T, TO>( |
|
|
|
public Future popAndPushNamed( |
|
|
|
TO result = default, |
|
|
|
object result = default, |
|
|
|
pop<TO>(result); |
|
|
|
return pushNamed<T>(routeName, arguments: arguments); |
|
|
|
pop<object>(result); |
|
|
|
return pushNamed(routeName, arguments: arguments); |
|
|
|
} |
|
|
|
|
|
|
|
public Future<T> pushNamedAndRemoveUntil<T>( |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Future<T> pushReplacement<T, TO>(Route<T> newRoute, TO result) { |
|
|
|
public Future pushReplacement(Route newRoute, object result) { |
|
|
|
D.assert(!_debugLocked); |
|
|
|
D.assert(() => { |
|
|
|
_debugLocked = true; |
|
|
|
|
|
|
return true; |
|
|
|
}); |
|
|
|
_afterNavigation(newRoute); |
|
|
|
return newRoute.popped.to<T>(); |
|
|
|
return newRoute.popped.to<object>(); |
|
|
|
} |
|
|
|
|
|
|
|
public Future<T> pushAndRemoveUntil<T>(Route<T> newRoute, RoutePredicate predicate) { |
|
|
|