buildRoute method

  1. @override
Widget buildRoute(
  1. BuildContext context, {
  2. Uri? url,
  3. String? routeId,
})
override

Builds a Widget for the given route url or id. This is used for top-level documents called routes. These could represent a page, dialog or a conditional-route.

Implementation

@override
Widget buildRoute(BuildContext context, {Uri? url, String? routeId}) =>
    RouteFutureBuilder(
      url: url,
      routeId: routeId,
      fetchRoute: ({path, routeId}) => provider
          .fetchRoute(path: path, routeId: routeId)
          .then((value) async {
        final finalRoute = await value?.init();
        return finalRoute;
      }),
      buildContent: buildContent,
    );