GetBlockResponse constructor

GetBlockResponse({
  1. int? height,
  2. String? hash,
  3. String? data,
  4. int? blockTime,
  5. BlockHeaderInfo? header,
  6. CertificateInfo? prevCert,
  7. Iterable<TransactionInfo>? txs,
})

Implementation

factory GetBlockResponse({
  $core.int? height,
  $core.String? hash,
  $core.String? data,
  $core.int? blockTime,
  BlockHeaderInfo? header,
  CertificateInfo? prevCert,
  $core.Iterable<$0.TransactionInfo>? txs,
}) {
  final _result = create();
  if (height != null) {
    _result.height = height;
  }
  if (hash != null) {
    _result.hash = hash;
  }
  if (data != null) {
    _result.data = data;
  }
  if (blockTime != null) {
    _result.blockTime = blockTime;
  }
  if (header != null) {
    _result.header = header;
  }
  if (prevCert != null) {
    _result.prevCert = prevCert;
  }
  if (txs != null) {
    _result.txs.addAll(txs);
  }
  return _result;
}