DocumentStyle constructor
DocumentStyle({
- double? width,
- double? height,
- EdgeInsets padding = EdgeInsets.zero,
- BackgroundStyle? background,
- InlineTextStyle? text,
- InlineTextStyle? boldText,
- InlineTextStyle? italicText,
- InlineTextStyle? codeText,
- BlockStyle? paragraph,
- BlockStyle? header1,
- BlockStyle? header2,
- BlockStyle? header3,
- BlockStyle? header4,
- BlockStyle? header5,
- 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);