create static method

RichText create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "richText",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "richText",
  5. RichTextPlain? rich_text_plain,
  6. RichTextBold? rich_text_bold,
  7. RichTextItalic? rich_text_italic,
  8. RichTextUnderline? rich_text_underline,
  9. RichTextStrikethrough? rich_text_strikethrough,
  10. RichTextFixed? rich_text_fixed,
  11. RichTextUrl? rich_text_url,
  12. RichTextEmailAddress? rich_text_email_address,
  13. RichTextSubscript? rich_text_subscript,
  14. RichTextSuperscript? rich_text_superscript,
  15. RichTextMarked? rich_text_marked,
  16. RichTextPhoneNumber? rich_text_phone_number,
  17. RichTextIcon? rich_text_icon,
  18. RichTextReference? rich_text_reference,
  19. RichTextAnchor? rich_text_anchor,
  20. RichTextAnchorLink? rich_text_anchor_link,
  21. RichTexts? rich_texts,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static RichText create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "richText",
  bool special_is_json_scheme_class = true,
  String special_return_type = "richText",
  RichTextPlain? rich_text_plain,
  RichTextBold? rich_text_bold,
  RichTextItalic? rich_text_italic,
  RichTextUnderline? rich_text_underline,
  RichTextStrikethrough? rich_text_strikethrough,
  RichTextFixed? rich_text_fixed,
  RichTextUrl? rich_text_url,
  RichTextEmailAddress? rich_text_email_address,
  RichTextSubscript? rich_text_subscript,
  RichTextSuperscript? rich_text_superscript,
  RichTextMarked? rich_text_marked,
  RichTextPhoneNumber? rich_text_phone_number,
  RichTextIcon? rich_text_icon,
  RichTextReference? rich_text_reference,
  RichTextAnchor? rich_text_anchor,
  RichTextAnchorLink? rich_text_anchor_link,
  RichTexts? rich_texts,
}) {
  // RichText richText = RichText({
  final Map richText_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "rich_text_plain": (rich_text_plain != null) ? rich_text_plain.toJson() : null,
    "rich_text_bold": (rich_text_bold != null) ? rich_text_bold.toJson() : null,
    "rich_text_italic": (rich_text_italic != null) ? rich_text_italic.toJson() : null,
    "rich_text_underline": (rich_text_underline != null) ? rich_text_underline.toJson() : null,
    "rich_text_strikethrough": (rich_text_strikethrough != null) ? rich_text_strikethrough.toJson() : null,
    "rich_text_fixed": (rich_text_fixed != null) ? rich_text_fixed.toJson() : null,
    "rich_text_url": (rich_text_url != null) ? rich_text_url.toJson() : null,
    "rich_text_email_address": (rich_text_email_address != null) ? rich_text_email_address.toJson() : null,
    "rich_text_subscript": (rich_text_subscript != null) ? rich_text_subscript.toJson() : null,
    "rich_text_superscript": (rich_text_superscript != null) ? rich_text_superscript.toJson() : null,
    "rich_text_marked": (rich_text_marked != null) ? rich_text_marked.toJson() : null,
    "rich_text_phone_number": (rich_text_phone_number != null) ? rich_text_phone_number.toJson() : null,
    "rich_text_icon": (rich_text_icon != null) ? rich_text_icon.toJson() : null,
    "rich_text_reference": (rich_text_reference != null) ? rich_text_reference.toJson() : null,
    "rich_text_anchor": (rich_text_anchor != null) ? rich_text_anchor.toJson() : null,
    "rich_text_anchor_link": (rich_text_anchor_link != null) ? rich_text_anchor_link.toJson() : null,
    "rich_texts": (rich_texts != null) ? rich_texts.toJson() : null,
  };

  richText_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (richText_data_create_json.containsKey(key) == false) {
        richText_data_create_json[key] = value;
      }
    });
  }
  return RichText(richText_data_create_json);
}