CompositeMessage.fromJson constructor

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

Implementation

factory CompositeMessage.fromJson(Map<String, dynamic> json) {
  final List<dynamic> contentJson = json['content'];
  final List<NestedContent> content = contentJson
      .map((dynamic e) => NestedContent.fromJson(e as Map<String, dynamic>))
      .toList();
  return CompositeMessage(content: content);
}