Response constructor

Response({
  1. ResponseException? exception,
  2. ResponseEcho? echo,
  3. ResponseFlush? flush,
  4. ResponseInfo? info,
  5. ResponseSetOption? setOption,
  6. ResponseInitChain? initChain,
  7. ResponseQuery? query,
  8. ResponseBeginBlock? beginBlock,
  9. ResponseCheckTx? checkTx,
  10. ResponseDeliverTx? deliverTx,
  11. ResponseEndBlock? endBlock,
  12. ResponseCommit? commit,
  13. ResponseListSnapshots? listSnapshots,
  14. ResponseOfferSnapshot? offerSnapshot,
  15. ResponseLoadSnapshotChunk? loadSnapshotChunk,
  16. ResponseApplySnapshotChunk? applySnapshotChunk,
})

Implementation

factory Response({
  ResponseException? exception,
  ResponseEcho? echo,
  ResponseFlush? flush,
  ResponseInfo? info,
  ResponseSetOption? setOption,
  ResponseInitChain? initChain,
  ResponseQuery? query,
  ResponseBeginBlock? beginBlock,
  ResponseCheckTx? checkTx,
  ResponseDeliverTx? deliverTx,
  ResponseEndBlock? endBlock,
  ResponseCommit? commit,
  ResponseListSnapshots? listSnapshots,
  ResponseOfferSnapshot? offerSnapshot,
  ResponseLoadSnapshotChunk? loadSnapshotChunk,
  ResponseApplySnapshotChunk? applySnapshotChunk,
}) {
  final _result = create();
  if (exception != null) {
    _result.exception = exception;
  }
  if (echo != null) {
    _result.echo = echo;
  }
  if (flush != null) {
    _result.flush = flush;
  }
  if (info != null) {
    _result.info = info;
  }
  if (setOption != null) {
    _result.setOption = setOption;
  }
  if (initChain != null) {
    _result.initChain = initChain;
  }
  if (query != null) {
    _result.query = query;
  }
  if (beginBlock != null) {
    _result.beginBlock = beginBlock;
  }
  if (checkTx != null) {
    _result.checkTx = checkTx;
  }
  if (deliverTx != null) {
    _result.deliverTx = deliverTx;
  }
  if (endBlock != null) {
    _result.endBlock = endBlock;
  }
  if (commit != null) {
    _result.commit = commit;
  }
  if (listSnapshots != null) {
    _result.listSnapshots = listSnapshots;
  }
  if (offerSnapshot != null) {
    _result.offerSnapshot = offerSnapshot;
  }
  if (loadSnapshotChunk != null) {
    _result.loadSnapshotChunk = loadSnapshotChunk;
  }
  if (applySnapshotChunk != null) {
    _result.applySnapshotChunk = applySnapshotChunk;
  }
  return _result;
}