Bear class
The main Object
you will use.
Constructors
- Bear()
Properties
- middlewares → BearMiddlewares
-
The
BearMiddlewares
which contains middlewares.final - router → BearRouter
-
The
BearRouter
which contains routes.final - server ↔ HttpServer
-
The intern server of
Bear
.read / write - hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
close(
{bool silent: false, bool force: false }) → void - Stop the Bear. [...]
-
delete(
String path, Object handler) → void - Add a DELETE route. [...]
-
get(
String path, Object handler) → void - Add a GET route. [...]
-
listen(
{String host: "127.0.0.1", int port: 4040, bool silent: false }) → void - Start the Bear. [...]
-
patch(
String path, Object handler) → void - Add a PATCH route. [...]
-
post(
String path, Object handler) → void - Add a POST route. [...]
-
put(
String path, Object handler) → void - Add a PUT route. [...]
-
static(
String path, String directory) → void - Add a static route. [...]
-
use(
BearMiddleware middleware) → void - Add a new BearMiddleware to use. [...]
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
@pragma("vm:entry-point"), inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited