executeCommand<T> method

Future<VtjCommandResult<T>> executeCommand<T>(
  1. VtjCommand<T> command
)

Implementation

Future<VtjCommandResult<T>> executeCommand<T>(VtjCommand<T> command) async {
  if (_writeCharacteristic == null || _replyCharacteristic == null) {
    return const VtjCommandResult.failure(
      'Characteristics not initialized',
      null,
    );
  }

  return await command.execute(_writeCharacteristic!, _replyCharacteristic!);
}