ServeRouter class

Example: ServeRouter((request) => ResponseEntity.ok(body: 'Hello world!!!')) This will handle all request and always return a 200:Hello world!!!

Inheritance

Constructors

ServeRouter(RequestHandler function)

Properties

function RequestHandler
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canHandle(RequestEntity request) bool
override
handler(RequestEntity request) FutureOr<ResponseEntity>
override
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