DocumentStyle class

DocumentStyle is a user-facing description of how to render an entire body of text; it roughly corresponds to a stylesheet in HTML.

This class represents a top-level style sheet, comprised of properties that describe the document as a whole (as opposed to lower-level styles that represent more granular elements such as paragraphs, headers, etc).

All styles that collectively describe how to render text are organized into a tree, with DocumentStyle at the root.

Inheritance

Constructors

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})

Properties

background BackgroundStyle?
If present, describes what kind of background and borders to draw for the document page(s).
final
boldText InlineTextStyle
no setter
codeText InlineTextStyle
no setter
hashCode int
The hash code for this object.
no setterinherited
header1 BlockStyle
Styles for HeaderNodes, levels 1 to 6.
no setter
header2 BlockStyle
no setter
header3 BlockStyle
no setter
header4 BlockStyle
no setter
header5 BlockStyle
no setter
header6 BlockStyle
no setter
height double?
Outer height of the document page.
final
italicText InlineTextStyle
no setter
overflow → Overflow
Behavior of the document when the amount of content that needs to be laid out exceeds the provided height. See the Overflow enum description for more details.
no setter
padding EdgeInsets
The distance from the outer edges of the page to the inner content box of the document.
final
paragraph BlockStyle
Style for ParagraphNodes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text InlineTextStyle
no setter
width double?
Outer width of the document page.
final

Methods

copyWith(covariant DocumentStyle other) DocumentStyle
Creates a new FlameTextStyle, preferring the properties of other if present, falling back to the properties of this.
override
merge(FlameTextStyle? style1, FlameTextStyle? style2) FlameTextStyle?
Merges two FlameTextStyles together, preferring the properties of style2 if present, falling back to the properties of style1.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

defaultTextStyle InlineTextStyle
getter/setter pair