clear method

void clear()

Forgets everything, keeping the entry.

The host decides when, because only the host knows what it just asked for. This is a record of what has been reported, not a reading of what is wrong now — nothing arrives to say an overflow stopped, so a demo that overflowed once keeps reporting it until this is called. That is right for a log and wrong for a panel headed Problems: you fix the overflow, reload, and the fixed problem is still listed.

So a reload clears first and collects again. Doing it in the guest on every frame instead would make a transient layout error flicker in and out of the list, which is worse than either.

Implementation

void clear() => _errors.clear();