registerCommadableMethod method

void registerCommadableMethod(
  1. String method,
  2. Schema? schema,
  3. Future action(
    1. String? correlationId,
    2. Parameters args
    )
)

Registers a commandable method in this objects GRPC server (service) by the given name.,

  • method the GRPC method name.
  • schema the schema to use for parameter validation.
  • action the action to perform at the given route.

Implementation

void registerCommadableMethod(String method, Schema? schema,
    Future<dynamic> Function(String? correlationId, Parameters args) action) {
  _commandableMethods![method] = action;
  _commandableSchemas![method] = schema ?? Schema();
}