put method

void put(
  1. String tag,
  2. String content, {
  3. bool limit = true,
})

Implementation

void put(String tag, String content, {bool limit = true}) {
  //屏蔽掉刷屏的请求
  if (content.contains("ac=last_msg")) {
    return;
  }
  if (!_enable) {
    return;
  }
  if (InnerUtils.isEmpty(tag)) {
    return;
  }
  MonitorMessageNotifier<String>? notifier = _maps[tag];
  if (notifier == null) {
    notifier = MonitorMessageNotifier<String>();
    _maps[tag] = notifier;
  }
  notifier.add(content, limit: limit);
}