initialRoute method

NyRouterRoute initialRoute({
  1. bool when()?,
})

Set the initial route.

Implementation

NyRouterRoute initialRoute({bool Function()? when}) {
  if (when != null && when()) {
    _initialRoute = true;
  }
  if (when == null) {
    _initialRoute = true;
  }
  if (_initialRoute) {
    NyNavigator.instance.router.updateRoute(this);
  }
  return this;
}