call<T> method

Future<T> call<T>(
  1. String name, {
  2. BaseArguments? args,
  3. NavigationType navigationType = NavigationType.push,
  4. dynamic result,
  5. bool removeUntilPredicate(
    1. Route route
    )?,
  6. Map<String, dynamic>? params,
  7. PageTransitionType? pageTransitionType,
})

Makes this a callable class. Delegates to navigate.

Implementation

Future<T> call<T>(String name,
    {BaseArguments? args,
    NavigationType navigationType = NavigationType.push,
    dynamic result,
    bool Function(Route<dynamic> route)? removeUntilPredicate,
    Map<String, dynamic>? params,
    PageTransitionType? pageTransitionType}) {
  assert(navigationType != NavigationType.pushAndRemoveUntil ||
      removeUntilPredicate != null);

  _checkAndThrowRouteNotFound(name, args, navigationType);

  return navigate<T>(name,
      navigationType: navigationType,
      result: result,
      removeUntilPredicate: removeUntilPredicate,
      args: args,
      pageTransitionType: pageTransitionType);
}