SwapInput constructor

SwapInput({
  1. Chain? fromChain,
  2. String? fromAddress,
  3. Asset? toAsset,
  4. String? toAddress,
  5. String? vaultAddress,
  6. String? routerAddress,
  7. String? fromAmount,
  8. String? toAmountLimit,
})

Implementation

factory SwapInput({
  Chain? fromChain,
  $core.String? fromAddress,
  Asset? toAsset,
  $core.String? toAddress,
  $core.String? vaultAddress,
  $core.String? routerAddress,
  $core.String? fromAmount,
  $core.String? toAmountLimit,
}) {
  final _result = create();
  if (fromChain != null) {
    _result.fromChain = fromChain;
  }
  if (fromAddress != null) {
    _result.fromAddress = fromAddress;
  }
  if (toAsset != null) {
    _result.toAsset = toAsset;
  }
  if (toAddress != null) {
    _result.toAddress = toAddress;
  }
  if (vaultAddress != null) {
    _result.vaultAddress = vaultAddress;
  }
  if (routerAddress != null) {
    _result.routerAddress = routerAddress;
  }
  if (fromAmount != null) {
    _result.fromAmount = fromAmount;
  }
  if (toAmountLimit != null) {
    _result.toAmountLimit = toAmountLimit;
  }
  return _result;
}