GenericAttachment.fromJson constructor

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

Implementation

factory GenericAttachment.fromJson(Map<String, dynamic> json) {
  return GenericAttachment(
    attachmentLinkUrl: json['attachmentLinkUrl'] as String?,
    buttons: (json['buttons'] as List?)
        ?.whereNotNull()
        .map((e) => Button.fromJson(e as Map<String, dynamic>))
        .toList(),
    imageUrl: json['imageUrl'] as String?,
    subTitle: json['subTitle'] as String?,
    title: json['title'] as String?,
  );
}