ResponseCard.fromJson constructor

ResponseCard.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ResponseCard.fromJson(Map<String, dynamic> json) {
  return ResponseCard(
    contentType: (json['contentType'] as String?)?.toContentType(),
    genericAttachments: (json['genericAttachments'] as List?)
        ?.whereNotNull()
        .map((e) => GenericAttachment.fromJson(e as Map<String, dynamic>))
        .toList(),
    version: json['version'] as String?,
  );
}