transfer method
void
transfer({})
Implementation
void transfer({
required String ledgerId,
required Uint8List fromAccountId,
required Uint8List toAccountId,
required Int64 amount,
String? memo,
}) {
final metadata = <Any>[];
if (memo != null) {
metadata.add(Metadata.memo(memo));
}
final rand = Random.secure();
final transfer = tx.CreateLedgerTransfer()
..ledgerId = ledgerId
..nonce = Int64.fromInts(rand.nextInt(1 << 32), rand.nextInt(1 << 32))
..transfer = (tx.CreateTransfer()
..setSteps([
tx.TransferStep()
..fromAccountId = fromAccountId
..toAccountId = toAccountId
..amount = amount
..setMetadata(metadata)
]));
_transfers.add(transfer);
}