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 WalletImportCompletedEvent fromMap(Map<String, dynamic> map) {
return WalletImportCompletedEvent(
walletId: map['walletId'] as String,
totalAddresses: map['totalAddresses'] as int,
totalTransactions: map['totalTransactions'] as int,
importedUtxos: (map['importedUtxos'] as List)
.cast<Map<String, dynamic>>(),
eventId: map['eventId'] as String?,
timestamp: map['timestamp'] != null
? (map['timestamp'] is String
? DateTime.parse(map['timestamp'] as String)
: map['timestamp'] as DateTime)
: null,
version: map['version'] as int?,
metadata: map['metadata'] as Map<String, dynamic>?,
);
}