getInitialMessage method

Future<RemoteMessage?> getInitialMessage()

If the application has been opened from a terminated state via a RemoteMessage (containing a Notification), it will be returned, otherwise it will be null.

Once the RemoteMessage has been consumed, it will be removed and further calls to getInitialMessage will be null.

This should be used to determine whether specific notification interaction should open the app with a specific purpose (e.g. opening a chat message, specific screen etc).

Implementation

Future<RemoteMessage?> getInitialMessage() {
  return _delegate.getInitialMessage();
}