RichTextContainerList.fromJson constructor

RichTextContainerList.fromJson(
  1. JSONMap json, {
  2. required bool isOrdered,
})

Implementation

factory RichTextContainerList.fromJson(JSONMap json, {required bool isOrdered}) => RichTextContainerList(
      isOrdered: isOrdered,
      rows: List<JSONMap>.from(json["content"])
          // Each object is of type "list_item" which only ever contains a single Paragraph object named "content".
          .map((e) => RichTextContainerParagraph.fromJson(JSONMap.from(e["content"][0])))
          .toList(),
    );