fromMap static method
Create event from a map during deserialization This is a factory method that should be implemented by concrete event classes
Implementation
static TransactionSpendDeferredEvent fromMap(Map<String, dynamic> map) => TransactionSpendDeferredEvent(
walletId: map['walletId'] as String,
txid: map['txid'] as String,
heldInputs: [
for (final e in (map['heldInputs'] as List? ?? const []))
if (e is Map) {for (final entry in e.entries) entry.key.toString(): entry.value},
],
recipientAddresses: List<String>.from(map['recipientAddresses'] as List? ?? const []),
paymentAmount: map['paymentAmount']?.toString() ?? '0',
fee: (map['fee'] as num?)?.toInt() ?? 0,
invoiceId: map['invoiceId'] as String?,
purpose: map['purpose'] as String?,
inferred: map['inferred'] as bool? ?? false,
reactivated: map['reactivated'] as bool? ?? false,
supersedes: map['supersedes'] as String?,
recordedAt: _deferredDate(map['recordedAt']),
eventId: map['eventId'] as String?,
timestamp: _deferredDate(map['timestamp']),
version: map['version'] as int?,
metadata: map['metadata'] as Map<String, dynamic>?,
);