getClearedAt method

  1. @override
Future<ChatResult<DateTime?>> getClearedAt(
  1. String roomId
)
override

Returns the timestamp at which the user cleared this room's chat, or ChatSuccess(null) if the chat was never cleared. Wrapped in ChatResult so a cache I/O failure surfaces explicitly instead of being conflated with "never cleared".

Pure-local read — cheap to call on every chat-screen open to decide whether to filter the rendered message list.

Implementation

@override
Future<ChatResult<DateTime?>> getClearedAt(String roomId) async =>
    ChatSuccess(_clearedAt[roomId]);