init static method

void init({
  1. String title = "日志",
  2. required bool isDebug,
  3. int? limitLength,
})

Implementation

static void init(
    {String title = "日志", required bool isDebug, int? limitLength}) {
  _title = title;
  _isDebug = isDebug;
  _limitLength = limitLength ??= _limitLength;
  _startLine = "$_split$_title$_split";
  var endLineStr = StringBuffer();
  var cnCharReg = RegExp("[\u4e00-\u9fa5]");
  for (int i = 0; i < _startLine.length; i++) {
    if (cnCharReg.stringMatch(_startLine[i]) != null) {
      endLineStr.write(_separator);
    }
    endLineStr.write(_separator);
  }
  _endLine = endLineStr.toString();
}