formatAndOptimize method

void formatAndOptimize(
  1. NotusStyle? style
)

Formats this node and optimizes it with adjacent leaf nodes if needed.

Implementation

void formatAndOptimize(NotusStyle? style) {
  if (style != null && style.isNotEmpty) {
    applyStyle(style);
  }
  optimize();
}