messages method
Returns a stream that emits inbox messages whenever they change.
The stream immediately emits the current messages when subscribed, then emits again whenever messages are added, updated, or removed.
Usage: inbox.messages().listen((messages) { ... })
@param topic Optional topic filter. If provided, stream only emits messages that have this topic in their topics list. If null, all messages are emitted. @return Stream of inbox messages
Implementation
Stream<List<InboxMessage>> messages({String? topic}) {
return _platform.messages(topic: topic);
}