Parameters class
A wrapper for the parameters to a server method.
JSON-RPC 2.0 allows parameters that are either a list or a map. This class provides functions that not only assert that the parameters object is the correct type, but also that the expected arguments exist and are themselves the correct type.
Example usage:
server.registerMethod("subtract", (params) {
return params["minuend"].asNum - params["subtrahend"].asNum;
});
- Implementers
Constructors
- Parameters(String method, dynamic _value)
Properties
- asList → List
-
Asserts that value exists and is a List and returns it.
read-only
- asMap → Map
-
Asserts that value exists and is a Map and returns it.
read-only
- method → String
-
The name of the method that this request called.
final
- value → dynamic
-
The underlying value of the parameters object. [...]
read-only
- 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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator [](
dynamic key) → Parameter - Returns a single parameter. [...]
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited