ChannelResponse.fromJson constructor
Create from JSON.
Implementation
factory ChannelResponse.fromJson(Map<String, dynamic> json) {
return ChannelResponse(
conversation:
ConversationKey.fromJson(json['conversation'] as Map<String, dynamic>),
type: json['type'] as String,
text: json['text'] as String?,
blocks: (json['blocks'] as List<dynamic>?)
?.map((e) => e as Map<String, dynamic>)
.toList(),
attachments: (json['attachments'] as List<dynamic>?)
?.map((e) => ChannelAttachment.fromJson(e as Map<String, dynamic>))
.toList(),
replyTo: json['replyTo'] as String?,
options: json['options'] as Map<String, dynamic>?,
);
}