clear method
Deletes the log file.
Implementation
Future<void> clear() async {
_pendingWrites.clear();
_flushTimer?.cancel();
_flushTimer = null;
try {
if (await _file.exists()) {
await _file.delete();
}
} catch (_) {
// Ignore delete errors.
}
}