send method

Future<HyperDeckResponse> send(
  1. String command
)

Sends raw protocol text. The text must contain exactly one command.

Implementation

Future<HyperDeckResponse> send(String command) {
  if (_closed) throw StateError('HyperDeck connection is closed.');
  final completer = Completer<HyperDeckResponse>();
  _pending.add(completer);
  socket.write(command.endsWith('\n') ? command : '$command\n');
  return completer.future;
}