currentMessages property

  1. @override
List<Message> get currentMessages
override

Snapshot of all messages received in this session, sorted oldest-first.

Persists across disconnect/connect cycles. Use this to initialise a message list widget immediately on mount — the UI avoids an empty-state flash even when the user navigates away and back. The list is cleared by clearSession and returns to empty after dispose.

Implementation

@override
List<Message> get currentMessages =>
    List<Message>.unmodifiable(_messageHistory);