M4eTransactionForm constructor

M4eTransactionForm({@required Wallet from, @required Wallet to, @required Amount amount, @required DateTime at, @required TransactionMeta meta, TransactionStatus status: TransactionStatus.pending })

Implementation

factory M4eTransactionForm({
  @required Wallet from,
  @required Wallet to,
  @required Amount amount,
  @required DateTime at,
  @required TransactionMeta meta,
  TransactionStatus status = TransactionStatus.pending,
}) {
  assert(from != null, 'Transaction [from] wallet should not be null');
  assert(to != null, 'Transaction [to] wallet should not be null');
  assert(from != to,
      'Transaction [from] and [to] wallets should not be the same');
  assert(amount != null, 'Transaction [amount] should not be null');
  assert(at != null, 'Transaction [at] should not be null');
  assert(meta != null, 'Transaction [meta] should not be null');
  return M4eTransactionForm._(from, to, amount, at, meta, status);
}