createRoute method Null safety

  1. @override
Route<T> createRoute(
  1. BuildContext context

Creates the Route that corresponds to this page.

The created Route must have its Route.settings property set to this Page.


Route<T> createRoute(BuildContext context) {
  // return GetPageRoute<T>(settings: this, page: page);
  final _page = PageRedirect(
    route: this,
    settings: this,
    unknownRoute: unknownRoute,
  ).getPageToRoute<T>(this, unknownRoute);

  popped = _page.popped;
  return _page;