toJson method
Converts the object to a JSON representation.
Implementation
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {
"account": account,
"flags": _getFlags(),
"signing_pub_key": signingPubKey,
"last_ledger_sequence": lastLedgerSequence,
"sequence": sequence,
"txn_signature": txnSignature,
"fee": fee?.toString(),
"transaction_type": transactionType.value,
"network_id": networkId,
"ticket_sequence": ticketSequance,
"source_tag": sourceTag,
"account_txn_id": accountTxId,
"signers": (signers?.isEmpty ?? true)
? null
: signers!.map((e) => e.toJson()).toList(),
"memos": (memos?.isEmpty ?? true)
? null
: memos!.map((e) => e.toJson()).toList()
};
return json;
}