ParagraphFormat class

A paragraph's resolved formatting. Lengths in points.

Constructors

ParagraphFormat({ParagraphAlignment alignment = ParagraphAlignment.left, double indentLeft = 0, double indentRight = 0, double firstLineIndent = 0, double spaceBefore = 0, double spaceAfter = 0, double lineSpacing = 1, LineSpacingRule lineSpacingRule = LineSpacingRule.auto, int? fill, WordBorderLine? borderTop, WordBorderLine? borderBottom, WordBorderLine? borderLeft, WordBorderLine? borderRight, bool pageBreakBefore = false, bool keepWithNext = false, bool rightToLeft = false})
Paragraph formatting; the defaults are plain left-aligned single spacing with no indents or space around.
const

Properties

alignment → ParagraphAlignment
Horizontal alignment of the lines (w:jc).
final
borderBottom → WordBorderLine?
The line below the paragraph (w:pBdr), or null for none.
final
borderLeft → WordBorderLine?
The line on the left (start) side (w:pBdr), or null for none.
final
borderRight → WordBorderLine?
The line on the right (end) side (w:pBdr), or null for none.
final
borderTop → WordBorderLine?
The line above the paragraph (w:pBdr), or null for none.
final
fill → int?
Background as 0xAARRGGBB, or null.
final
firstLineIndent → double
Positive for a first-line indent, negative for a hanging indent.
final
hashCode → int
The hash code for this object.
no setterinherited
indentLeft → double
Left (start) indent (w:ind).
final
indentRight → double
Right (end) indent (w:ind).
final
keepWithNext → bool
Whether the paragraph should stay on the same page as the next one (w:keepNext).
final
lineSpacing → double
Line spacing (w:spacing w:line): a multiple of single spacing for LineSpacingRule.auto, otherwise a height in points.
final
lineSpacingRule → LineSpacingRule
How to read lineSpacing (w:spacing w:lineRule).
final
pageBreakBefore → bool
Whether the paragraph starts on a new page (w:pageBreakBefore).
final
rightToLeft → bool
Whether the paragraph runs right to left (w:bidi).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spaceAfter → double
Space below the paragraph (w:spacing w:after).
final
spaceBefore → double
Space above the paragraph (w:spacing w:before).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
withSpacing({double? before, double? after}) → ParagraphFormat
The same formatting with different spacing (for the two pieces of a paragraph split across pages).

Operators

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

Constants

plain → const ParagraphFormat
The default formatting.