fromMap static method

UTXOConfirmationUpdatedEvent fromMap(
  1. Map<String, dynamic> map
)

Create event from a map during deserialization This is a factory method that should be implemented by concrete event classes

Implementation

static UTXOConfirmationUpdatedEvent fromMap(Map<String, dynamic> map) {
  return UTXOConfirmationUpdatedEvent(
    walletId: map['walletId'] as String,
    txid: map['txid'] as String,
    vout: map['vout'] as int,
    confirmations: map['confirmations'] as int,
    blockHeight: map['blockHeight'] as int,
    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>?,
  );
}