flush method
Manually trigger a sync of all pending items.
Implementation
@override
Future<bool> flush() async {
// First, move priority logs to the front of the regular queue
while (_priorityLogs.isNotEmpty) {
// We need to add priority logs to the front of the base queue
// Since we can't access the private _pendingItems, we'll process them here
final priorityLog = _priorityLogs.removeFirst();
super.queueItem(priorityLog);
}
return super.flush();
}