AppTransaction constructor

AppTransaction({
  1. double amount = 0,
  2. TransactionType type = TransactionType.purchase,
  3. String? senderId = CoreConstants.appBank,
  4. String? recipientId = CoreConstants.appBank,
  5. String id = "",
  6. String description = "",
  7. int createdTime = 0,
  8. String? orderId,
  9. AppCurrency currency = AppCurrency.appCoin,
  10. TransactionStatus status = TransactionStatus.pending,
  11. String? secretKey,
})

VERIFY IF NEEDED

Implementation

// double balanceBefore; // Saldo de la billetera afectada ANTES de esta transacción
// double balanceAfter; // Saldo de la billetera afectada DESPUÉS de esta transacción

AppTransaction({
  this.amount = 0,
  this.type = TransactionType.purchase,
  this.senderId = CoreConstants.appBank, // Considerar si siempre habrá un senderId
  this.recipientId = CoreConstants.appBank, // Considerar si siempre habrá un recipientId
  this.id = "",
  this.description = "",
  this.createdTime = 0,
  this.orderId, // Es opcional
  this.currency = AppCurrency.appCoin, // Moneda por defecto
  this.status = TransactionStatus.pending, // Estado por defect
  this.secretKey,
});