onMessage property

Stream<Payload> onMessage

When a push message is received and the user is currently on a page for your origin, the message is passed to the page and an onMessage event is dispatched with the payload of the push message.

Implementation

Stream<Payload> get onMessage => _onMessageController.stream;