Server class
This Class Represents A Server http://www.example.com isHttp = true, host = www.example.com, port = -1
https://127.0.0.1:5588 isHttp = false, host = 127.0.0.1, port = 5588
Constructors
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
-
addRoute(
ServerRoute serverRoute) → void - Adds Route To Server
-
getCookieHandler(
) → CookieHandler - Return Server Cookies
-
getDefaultBody(
) → Map< String, dynamic> - Returns Default Body
-
getDefaultHeader(
) → Map< String, dynamic> - Returns Default Header
-
getId(
) → String - Returns Server Id
-
getRoute(
String id) → ServerRoute - Returns Route By Id
-
getUri(
{String? routeId, Map< String, String> ? replacements}) → Uri - Returns Url With Given Route Path
-
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
Static Methods
-
fromHost(
String id, String host, {bool isHttp = true, Map< String, dynamic> ? defaultHeader, Map<String, dynamic> ? defaultBody}) → Future<Server> - Creates Server From Host
-
fromHostAndPort(
String id, String host, int port, {bool isHttp = true, Map< String, dynamic> ? defaultHeader, Map<String, dynamic> ? defaultBody}) → Future<Server> - Creates Server From Host And Port
-
localhost(
String id, {bool withNumbers = false, bool isHttp = true, Map< String, dynamic> ? defaultHeader, Map<String, dynamic> ? defaultBody}) → Future<Server> - Creates Server From Localhost