filterText static method

String filterText(
  1. String text
)

Implementation

static String filterText(String text) {
  String tag = '<br>';
  while (text.contains('<br>')) {
    // flutter 算高度,单个\n算不准,必须加两个
    text = text.replaceAll(tag, '\n\n');
  }
  return text;
}