add method
Add one log. It sorts logs after adding new element. If maximumSize is set and max size is reached, first log will be deleted.
Implementation
void add(AliceLog log) {
final values = _logsSubject.value;
final count = values.length;
if (maximumSize > 0 && count >= maximumSize) {
values.removeAt(0);
}
values.add(log);
values.sort((log1, log2) => log1.timestamp.compareTo(log2.timestamp));
_logsSubject.add(values);
}