pushNamed<T> method

Future<Object?>? pushNamed<T>(
  1. String routeName, {
  2. PulseXArguments<T>? arguments,
})

Navigate to a new route using route name TODO: this function is still under development

Implementation

Future<Object?>? pushNamed<T>(String routeName, {PulseXArguments<T>? arguments}) {
  BuildContext? context = navigatorKey.currentState?.context;
  assert(context != null, PulseXErrors.contextNotFoundError());

  return navigatorKey.currentState?.pushNamed(
    routeName,
    arguments: arguments,
  );
}