setReadMarker method
Set the read marker to the last synced event in this timeline.
Implementation
Future<void> setReadMarker({String? eventId, bool? public}) async {
eventId ??=
events.firstWhereOrNull((event) => event.status.isSynced)?.eventId;
if (eventId == null) return;
return room.setReadMarker(eventId, mRead: eventId, public: public);
}