MessageReplyOptions.fromJson constructor

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

Implementation

factory MessageReplyOptions.fromJson(Map<String, dynamic> json) {
  return MessageReplyOptions(
    text: json['text'] ?? '',
    html: json['html'] ?? '',
    cc: json['cc'] ?? '',
    attachments: json['attachments'] != null
        ? List<Attachment>.from(
            json['attachments'].map((item) => Attachment.fromJson(item)))
        : const [],
  );
}