splitAllPattern function

List<String> splitAllPattern(
  1. String text
)

split all pattern in text into a list of strings

Implementation

List<String> splitAllPattern(String text) {
  List<String> formattedText = [text];
  for (final TextPlusType type in TextPlusType.values) {
    if (type == TextPlusType.none) continue;
    formattedText = splitText(type.pattern, formattedText);
  }
  return formattedText;
}