pushNamed method

void pushNamed({
  1. required String name,
  2. Object? arguments,
  3. Widget? emptyPage,
  4. bool custom = false,
})

Implementation

void pushNamed({required String name,
  Object? arguments,
  Widget? emptyPage,
  bool custom = false
}) {
  var page = pageMap?[name];
  _location = name;
  if (custom) {
    page = routePathCallBack?.call(RouteInformation(location: _location));
  }
  if (page == null) {
    _location = '404';
    page = emptyPage ?? const EmptyPage();
  }
  push(page: page, name: name, arguments: arguments);
}