DocumentStyle constructor

DocumentStyle({
  1. double? width,
  2. double? height,
  3. EdgeInsets padding = EdgeInsets.zero,
  4. BackgroundStyle? background,
  5. InlineTextStyle? text,
  6. InlineTextStyle? boldText,
  7. InlineTextStyle? italicText,
  8. InlineTextStyle? codeText,
  9. BlockStyle? paragraph,
  10. BlockStyle? header1,
  11. BlockStyle? header2,
  12. BlockStyle? header3,
  13. BlockStyle? header4,
  14. BlockStyle? header5,
  15. BlockStyle? header6,
})

Implementation

DocumentStyle({
  this.width,
  this.height,
  this.padding = EdgeInsets.zero,
  this.background,
  InlineTextStyle? text,
  InlineTextStyle? boldText,
  InlineTextStyle? italicText,
  InlineTextStyle? codeText,
  BlockStyle? paragraph,
  BlockStyle? header1,
  BlockStyle? header2,
  BlockStyle? header3,
  BlockStyle? header4,
  BlockStyle? header5,
  BlockStyle? header6,
})  : _text = FlameTextStyle.merge(DocumentStyle.defaultTextStyle, text),
      _boldText = FlameTextStyle.merge(BoldTextNode.defaultStyle, boldText),
      _italicText =
          FlameTextStyle.merge(ItalicTextNode.defaultStyle, italicText),
      _codeText = FlameTextStyle.merge(CodeTextNode.defaultStyle, codeText),
      _paragraph =
          FlameTextStyle.merge(ParagraphNode.defaultStyle, paragraph),
      _header1 = FlameTextStyle.merge(HeaderNode.defaultStyleH1, header1),
      _header2 = FlameTextStyle.merge(HeaderNode.defaultStyleH2, header2),
      _header3 = FlameTextStyle.merge(HeaderNode.defaultStyleH3, header3),
      _header4 = FlameTextStyle.merge(HeaderNode.defaultStyleH4, header4),
      _header5 = FlameTextStyle.merge(HeaderNode.defaultStyleH5, header5),
      _header6 = FlameTextStyle.merge(HeaderNode.defaultStyleH6, header6);