getStyle method

ParagraphStyle getStyle()

Gets the style applied to this paragraph. If styleName is null or not found, returns the "normal" style.

Implementation

ParagraphStyle getStyle() {
  if (styleName == null) return ParagraphStyle.normal;
  return ParagraphStyle.styleByName[styleName] ?? ParagraphStyle.normal;
}