executeHandleParagraphSpacing function

bool executeHandleParagraphSpacing(
  1. FluentDocument document, {
  2. double? lineHeight,
  3. double? spacingBefore,
  4. double? spacingAfter,
})

Applies line height and paragraph spacing at the document level. These values are global and apply to all paragraphs.

Implementation

bool executeHandleParagraphSpacing(
  FluentDocument document, {
  double? lineHeight,
  double? spacingBefore,
  double? spacingAfter,
}) {
  if (lineHeight != null) document.pendingLineHeight = lineHeight;
  if (spacingBefore != null) document.pendingSpacingBefore = spacingBefore;
  if (spacingAfter != null) document.pendingSpacingAfter = spacingAfter;

  document.updateContent();
  return true;
}