onInAppMessageStatusChanged property

Stream<InAppMessageStatus> get onInAppMessageStatusChanged

A static getter that provides a Stream of in-app message status changes. You can detect In-App presenting status where needed. InAppShouldBeDisplayed - called when the in-app should be displayed InAppIsDisplayed - called when the in-app is displayed InAppShouldBeClosed - called when the in-app should be closed InAppIsClosed - called when the in-app is closed InAppReceivedError - called when the in-app can't be shown for some reason

Example usage:

Reteno.onInAppMessageStatusChanged.listen((status) {
   switch (status) {
     case InAppShouldBeDisplayed():
       print('In-app should be displayed');
     case InAppIsDisplayed():
       print('In-app is displayed');
     case InAppShouldBeClosed(:final action):
       print('In-app should be closed $action');
     case InAppIsClosed(:final action):
       print('In-app is closed $action');
     case InAppReceivedError(:final errorMessage):
       print('In-app error: $errorMessage');
   }
 });

Implementation

static Stream<InAppMessageStatus> get onInAppMessageStatusChanged => _platform.onInAppMessageStatusChanged.stream;