MessageCreateOptions.fromJson constructor
MessageCreateOptions.fromJson(
- Map<String, dynamic> json
)
Implementation
factory MessageCreateOptions.fromJson(Map<String, dynamic> json) {
return MessageCreateOptions(
to: json['to'] ?? '',
cc: json['cc'] ?? '',
from: json['from'] ?? '',
send: json['send'] ?? false,
subject: json['subject'] ?? '',
text: json['text'] ?? '',
html: json['html'] ?? '',
attachments: json['attachments'] != null
? List<Attachment>.from(
json['attachments'].map((item) => Attachment.fromJson(item)))
: const [],
);
}