add method

  1. @override
Future<void> add(
  1. String entry
)
override

Records entry, skipping blank lines and consecutive duplicates, then persists the (trimmed-to-cap) history. IO failures are swallowed so the interactive session is never interrupted by a disk error.

Implementation

@override
Future<void> add(String entry) async {
  if (_buffer.add(entry)) await _persist();
}