Controller class
A macro that marks class as a controller.
This macro:
- adds default constructor
- adds
router
field - registers all detected routes
@Controller()
class MyController {
@Get('/hello')
Response hello(Request r) => Response.ok('Hello');
}
See also:
Constructors
- Controller.new()
-
A macro that marks class as a controller.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildDeclarationsForClass(
ClassDeclaration clazz, MemberDeclarationBuilder builder) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited