Trade constructor

Trade({
  1. String? creator,
  2. Int64? id,
  3. Iterable<CoinInput>? coinInputs,
  4. Iterable<ItemInput>? itemInputs,
  5. Iterable<Coin>? coinOutputs,
  6. Iterable<ItemRef>? itemOutputs,
  7. String? extraInfo,
  8. String? receiver,
  9. Iterable<ItemRef>? tradedItemInputs,
})

Implementation

factory Trade({
  $core.String? creator,
  $fixnum.Int64? id,
  $core.Iterable<$4.CoinInput>? coinInputs,
  $core.Iterable<$4.ItemInput>? itemInputs,
  $core.Iterable<$2.Coin>? coinOutputs,
  $core.Iterable<ItemRef>? itemOutputs,
  $core.String? extraInfo,
  $core.String? receiver,
  $core.Iterable<ItemRef>? tradedItemInputs,
}) {
  final _result = create();
  if (creator != null) {
    _result.creator = creator;
  }
  if (id != null) {
    _result.id = id;
  }
  if (coinInputs != null) {
    _result.coinInputs.addAll(coinInputs);
  }
  if (itemInputs != null) {
    _result.itemInputs.addAll(itemInputs);
  }
  if (coinOutputs != null) {
    _result.coinOutputs.addAll(coinOutputs);
  }
  if (itemOutputs != null) {
    _result.itemOutputs.addAll(itemOutputs);
  }
  if (extraInfo != null) {
    _result.extraInfo = extraInfo;
  }
  if (receiver != null) {
    _result.receiver = receiver;
  }
  if (tradedItemInputs != null) {
    _result.tradedItemInputs.addAll(tradedItemInputs);
  }
  return _result;
}