handler property

ControllerPlan? get handler

How to call the controller (the last function of controllers), read once. Null when the route has no controller function. Throws a StateError when a parameter type is not known.

Implementation

ControllerPlan? get handler {
  if (!_handlerRead) {
    Function? fn = action;
    _handler = fn == null ? null : ControllerPlan.of(fn, this);
    _handlerRead = true;
  }
  return _handler;
}