Transaction constructor

Transaction({
  1. Transaction_Transfer? transfer,
  2. Transaction_ERC20Transfer? erc20Transfer,
  3. Transaction_ERC20Approve? erc20Approve,
  4. Transaction_ERC721Transfer? erc721Transfer,
  5. Transaction_ERC1155Transfer? erc1155Transfer,
  6. Transaction_ContractGeneric? contractGeneric,
})

Implementation

factory Transaction({
  Transaction_Transfer? transfer,
  Transaction_ERC20Transfer? erc20Transfer,
  Transaction_ERC20Approve? erc20Approve,
  Transaction_ERC721Transfer? erc721Transfer,
  Transaction_ERC1155Transfer? erc1155Transfer,
  Transaction_ContractGeneric? contractGeneric,
}) {
  final _result = create();
  if (transfer != null) {
    _result.transfer = transfer;
  }
  if (erc20Transfer != null) {
    _result.erc20Transfer = erc20Transfer;
  }
  if (erc20Approve != null) {
    _result.erc20Approve = erc20Approve;
  }
  if (erc721Transfer != null) {
    _result.erc721Transfer = erc721Transfer;
  }
  if (erc1155Transfer != null) {
    _result.erc1155Transfer = erc1155Transfer;
  }
  if (contractGeneric != null) {
    _result.contractGeneric = contractGeneric;
  }
  return _result;
}