splitLabel method

List<TextElement> splitLabel(
  1. TextElement wholeLabel
)

The wholeLabel is split into constituent chunks if it is multiline.

Implementation

List<TextElement> splitLabel(TextElement wholeLabel) => wholeLabel.text
    .split(_labelSplitPattern)
    .map((line) => (graphicsFactory.createTextElement(line.trim())
      ..textStyle = wholeLabel.textStyle))
    .toList();