# Controller class

Controller annotation for Jet View controllers

This annotation marks a class as a Jet View controller. Unlike @RestController, methods return view names by default.

Example Usage:

    @Controller('/web')
    class WebController {
      final UserService userService;

      WebController(this.userService);

      @GetMapping('/users')
      String listUsers(Model model) {
        model.addAttribute('users', userService.findAll());
        return 'users/list';
      }

      @GetMapping('/users/{id}')
      String viewUser(@PathVariable('id') String id, Model model) {
        model.addAttribute('user', userService.findById(id));
        return 'users/view';
      }

      @ResponseBody
      @GetMapping('/api/users')
      Future<List<User>> getUsersApi() async {
        return userService.findAll();
      }
    }

Inheritance
  - Object
  - ReflectableAnnotation
  - Controller
Mixed-in types
  - EqualsAndHashCode
Annotations
  - @Target({TargetKind.classType})

## Constructors

Controller.new([String? value])
  Controller annotation for Jet View controllers
  const

## Properties

annotationType → Type
  Returns the annotation _type of this annotation.
  no setter override
effectivePath → String?
  Gets the effective base path
  no setter
hashCode → int
  The hash code for this object.
  no setter inherited
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
value → String?
  Base path for all endpoints in this controller
  final

## Methods

equalizedProperties() → List<Object?>
  Mixin-style contract for value-based equality, `hashCode`, and `toString`.
  override
equals(Object other) → bool
  Checks whether the given object is logically equivalent to this annotation.
  inherited
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
toString() → String
  Returns a string representation of this annotation.
  override

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited