Staking constructor

Staking({
  1. Staking_Create? stakeCreate,
  2. Staking_Reclaim? stakeUnstake,
  3. Staking_Reclaim? stakeWithdraw,
  4. Staking_AddDeposit? stakeAddDeposit,
  5. Staking_Restake? stakeRestake,
  6. Staking_ChangeCandidate? stakeChangeCandidate,
  7. Staking_TransferOwnership? stakeTransferOwnership,
  8. Staking_CandidateRegister? candidateRegister,
  9. Staking_CandidateBasicInfo? candidateUpdate,
})

Implementation

factory Staking({
  Staking_Create? stakeCreate,
  Staking_Reclaim? stakeUnstake,
  Staking_Reclaim? stakeWithdraw,
  Staking_AddDeposit? stakeAddDeposit,
  Staking_Restake? stakeRestake,
  Staking_ChangeCandidate? stakeChangeCandidate,
  Staking_TransferOwnership? stakeTransferOwnership,
  Staking_CandidateRegister? candidateRegister,
  Staking_CandidateBasicInfo? candidateUpdate,
}) {
  final _result = create();
  if (stakeCreate != null) {
    _result.stakeCreate = stakeCreate;
  }
  if (stakeUnstake != null) {
    _result.stakeUnstake = stakeUnstake;
  }
  if (stakeWithdraw != null) {
    _result.stakeWithdraw = stakeWithdraw;
  }
  if (stakeAddDeposit != null) {
    _result.stakeAddDeposit = stakeAddDeposit;
  }
  if (stakeRestake != null) {
    _result.stakeRestake = stakeRestake;
  }
  if (stakeChangeCandidate != null) {
    _result.stakeChangeCandidate = stakeChangeCandidate;
  }
  if (stakeTransferOwnership != null) {
    _result.stakeTransferOwnership = stakeTransferOwnership;
  }
  if (candidateRegister != null) {
    _result.candidateRegister = candidateRegister;
  }
  if (candidateUpdate != null) {
    _result.candidateUpdate = candidateUpdate;
  }
  return _result;
}