addWatchObject method
group
认为可以在一块释放的对象组,一般在一个State中想监听的对象
Implementation
addWatchObject(Object obj, String group) {
if (LeakDetector.maxRetainingPath == null) return;
_onEventStreamController
.add(DetectorEvent(DetectorEventType.addObject, data: group));
_checkType(obj);
String key = group;
Expando? expando = _watchGroup[key];
expando ??= Expando('LeakChecker$key');
expando[obj] = true;
_watchGroup[key] = expando;
}