RichTextLeafMarkable constructor

RichTextLeafMarkable({
  1. required List<RichTextLeafMark> marks,
})

Implementation

RichTextLeafMarkable({required List<RichTextLeafMark> marks})
    : isCode = marks.containsType<RichTextLeafMarkCode>(),
      isBold = marks.containsType<RichTextLeafMarkBold>(),
      isItalic = marks.containsType<RichTextLeafMarkItalic>(),
      isStriked = marks.containsType<RichTextLeafMarkStrike>(),
      isUnderlined = marks.containsType<RichTextLeafMarkUnderline>(),
      isSuperscript = marks.containsType<RichTextLeafMarkSuperscript>(),
      isSubscript = marks.containsType<RichTextLeafMarkSubscript>(),
      anchor = marks.firstAsType(),
      link = marks.firstAsType(),
      backgroundColor = marks.firstAsType(),
      foregroundColor = marks.firstAsType();