ParagraphStyle class

Styles that apply to a whole paragraph.

Inherited paragraph styles are represented as unset fields in this message. A paragraph style's parent depends on where the paragraph style is defined:

  • The ParagraphStyle on a Paragraph inherits from the paragraph's corresponding named style type. * The ParagraphStyle on a named style inherits from the normal text named style. * The ParagraphStyle of the normal text named style inherits from the default paragraph style in the Docs editor. * The ParagraphStyle on a Paragraph element that's contained in a table may inherit its paragraph style from the table style. If the paragraph style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.

Constructors

ParagraphStyle({String? alignment, bool? avoidWidowAndOrphan, ParagraphBorder? borderBetween, ParagraphBorder? borderBottom, ParagraphBorder? borderLeft, ParagraphBorder? borderRight, ParagraphBorder? borderTop, String? direction, String? headingId, Dimension? indentEnd, Dimension? indentFirstLine, Dimension? indentStart, bool? keepLinesTogether, bool? keepWithNext, double? lineSpacing, String? namedStyleType, bool? pageBreakBefore, Shading? shading, Dimension? spaceAbove, Dimension? spaceBelow, String? spacingMode, List<TabStop>? tabStops})
ParagraphStyle.fromJson(Map json_)

Properties

alignment String?
The text alignment for this paragraph. Possible string values are:
getter/setter pair
avoidWidowAndOrphan bool?
Whether to avoid widows and orphans for the paragraph.
getter/setter pair
borderBetween ParagraphBorder?
The border between this paragraph and the next and previous paragraphs.
getter/setter pair
borderBottom ParagraphBorder?
The border at the bottom of this paragraph.
getter/setter pair
borderLeft ParagraphBorder?
The border to the left of this paragraph.
getter/setter pair
borderRight ParagraphBorder?
The border to the right of this paragraph.
getter/setter pair
borderTop ParagraphBorder?
The border at the top of this paragraph.
getter/setter pair
direction String?
The text direction of this paragraph.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headingId String?
The heading ID of the paragraph.
getter/setter pair
indentEnd Dimension?
The amount of indentation for the paragraph on the side that corresponds to the end of the text, based on the current paragraph direction.
getter/setter pair
indentFirstLine Dimension?
The amount of indentation for the first line of the paragraph.
getter/setter pair
indentStart Dimension?
The amount of indentation for the paragraph on the side that corresponds to the start of the text, based on the current paragraph direction.
getter/setter pair
keepLinesTogether bool?
Whether all lines of the paragraph should be laid out on the same page or column if possible.
getter/setter pair
keepWithNext bool?
Whether at least a part of this paragraph should be laid out on the same page or column as the next paragraph if possible.
getter/setter pair
lineSpacing double?
The amount of space between lines, as a percentage of normal, where normal is represented as 100.0.
getter/setter pair
namedStyleType String?
The named style type of the paragraph.
getter/setter pair
pageBreakBefore bool?
Whether the current paragraph should always start at the beginning of a page.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shading Shading?
The shading of the paragraph.
getter/setter pair
spaceAbove Dimension?
The amount of extra space above the paragraph.
getter/setter pair
spaceBelow Dimension?
The amount of extra space below the paragraph.
getter/setter pair
spacingMode String?
The spacing mode for the paragraph. Possible string values are:
getter/setter pair
tabStops List<TabStop>?
A list of the tab stops for this paragraph.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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