Wallet constructor

Wallet({
  1. String id = '',
  2. double balance = 0.0,
  3. AppCurrency currency = AppCurrency.appCoin,
  4. WalletStatus status = WalletStatus.active,
  5. int createdTime = 0,
  6. int lastUpdated = 0,
  7. String? lastTransactionId,
})

Implementation

Wallet({
  this.id = '',
  this.balance = 0.0,
  this.currency = AppCurrency.appCoin, // Valor por defecto
  this.status = WalletStatus.active,   // Valor por defecto
  this.createdTime = 0, // Debería establecerse al crear con DateTime.now().millisecondsSinceEpoch
  this.lastUpdated = 0, // Debería establecerse al crear y actualizar
  this.lastTransactionId, // Opcional
});