entryPoint property Null safety

Controller entryPoint

You implement this accessor to define how HTTP requests are handled by your application.

You must implement this method to return the first controller that will handle an HTTP request. Additional controllers are linked to the first controller to create the entire flow of your application's request handling logic. This method is invoked during startup and controllers cannot be changed after it is invoked. This method is always invoked after prepare.

In most applications, the first controller is a Router. Example:

    @override
    Controller get entryPoint {
      final router = Router();
      router.route("/path").link(() => PathController());
      return router;
    }

Implementation

Controller get entryPoint;