insertHistory method
Inserts a history entry with the specified page and tab indices.
Implementation
(int, int, DateTime) insertHistory(int pageIndex, int tabIndex, [DateTime? timestamp]) {
timestamp ??= now;
var historyEntry = (pageIndex, tabIndex, timestamp);
_history = [historyEntry, ..._history].orderBy((x) => x.$3).toList();
_history.removeEqualSiblings(compareFunction: (a, b) => a.$1 == b.$1 && a.$2 == b.$2);
return historyEntry;
}