getArgs<T> method

PulseXArguments<T> getArgs<T>()

Receives arguments when navigating to a new route with parameters

Example Usage: PulseXNavigator navigator = PulseNavigator(); PulseXArguments

Implementation

PulseXArguments<T> getArgs<T>() {
 BuildContext? context = navigatorKey.currentState?.context;
  assert(context != null, PulseXErrors.contextNotFoundError());

  return ModalRoute.of<T>(context!)?.settings.arguments as PulseXArguments<T>;
}