RpcMethod class
Describes how a method should be registered and invoked.
Constructors
- RpcMethod({required String name, required RpcMethodType kind, String? description, Type? requestCodec, Type? responseCodec, RpcDataTransferMode? transferMode})
-
Creates an RpcMethod annotation with a specific
kind.const - RpcMethod.bidirectionalStream({required String name, String? description, Type? requestCodec, Type? responseCodec, RpcDataTransferMode? transferMode})
-
Creates a bidirectional-stream RpcMethod annotation.
const
- RpcMethod.clientStream({required String name, String? description, Type? requestCodec, Type? responseCodec, RpcDataTransferMode? transferMode})
-
Creates a client-stream RpcMethod annotation.
const
- RpcMethod.serverStream({required String name, String? description, Type? requestCodec, Type? responseCodec, RpcDataTransferMode? transferMode})
-
Creates a server-stream RpcMethod annotation.
const
- RpcMethod.unary({required String name, String? description, Type? requestCodec, Type? responseCodec, RpcDataTransferMode? transferMode})
-
Creates a unary RpcMethod annotation.
const
Properties
- description → String?
-
Optional docs that will be copied into generated code.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → RpcMethodType
-
The call shape.
final
- name → String
-
RPC method identifier used for registration.
final
- requestCodec → Type?
-
Override request codec (must have a const constructor).
final
- responseCodec → Type?
-
Override response codec (must have a const constructor).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transferMode → RpcDataTransferMode?
-
Optional transfer mode override for this method.
final
Methods
-
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