Command constructor

Command({
  1. OpCode? opCode,
  2. InitCommand? init,
  3. ResetCommand? reset,
})

Implementation

factory Command({
  OpCode? opCode,
  InitCommand? init,
  ResetCommand? reset,
}) {
  final result = create();
  if (opCode != null) {
    result.opCode = opCode;
  }
  if (init != null) {
    result.init = init;
  }
  if (reset != null) {
    result.reset = reset;
  }
  return result;
}