startCommand method

  1. @override
Future<void> startCommand(
  1. String commandId,
  2. PrivCommand command, {
  3. int? timeoutMillis,
})
override

Starts command for streaming consumption and keeps it under commandId.

The process is cancelled when the stream subscription is cancelled or when cancelCommand is called.

Implementation

@override
Future<void> startCommand(
  String commandId,
  PrivCommand command, {
  int? timeoutMillis,
}) =>
    methodChannel.invokeMethod<void>('startCommandStream', <String, Object?>{
      'commandId': commandId,
      ...command.toMap(),
      'timeoutMillis': timeoutMillis,
    });