RewardedEventListener class mixin

Rewarded life cycle goes as follows:

  1. onLoaded: Called when the banner is loaded and ready to be shown. Or If this goes wrong, the onFailedToLoad when this happens the factory marks the object for deletion, and calls R89AdFactory.createRewarded onComplete
  2. onOpen: Something happen in your app and you call the factory R89AdFactory.show so this is the event is invoked if everything goes according to plan. Otherwise onAdFailedToShowFullScreen is called, you will receive and error message string with information about it.
  3. onImpression: This means it did finish loading the creatives in the screen and they can be clicked
  4. onClick: The ad opens another Intent with the advertiser link
  5. onRewardEarned: Called when the user has earned a reward it's usually called before onAdDismissedFullScreenContent but it can change
  6. onAdDismissedFullScreenContent: Called when the rewarded is closed normally
  • R89AdFactory.createRewarded onComplete: Is called when some situations happen. So the app flow can be recovered. Situations when called are:
    • Everything went right and the user just closed the fullscreen ad
    • The ad hasn't loaded yet and you tried to show it
    • The ad has been Invalidated and you tried to show it. Gets invalidated when:
    • Fails to load
    • Already shown
    • Too Long without showing it
    • The ad failed to show
Implemented types

Constructors

RewardedEventListener.callbacks({AdFailedToLoadCallback? onAdFailedToShowFullScreenCallback, AdVoidCallback? onAdDismissedFullScreenContentCallback, AdVoidCallback? onClickCallback, AdFailedToLoadCallback? onFailedToLoadCallback, AdVoidCallback? onImpressionCallback, AdVoidCallback? onLoadedCallback, AdVoidCallback? onOpenCallback, AdOnRewardEarnedCallback? onRewardEarnedCallback})
The helper factory constructor, which can be used to listen directly and in-place to specific events without the need to extend, mix, or implement RewardedEventListener.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAdDismissedFullScreenContent() → void
Called when the rewarded is closed normally.
onAdFailedToShowFullScreen(String message) → void
Called when is going to open at fullScreen but fails to do so in full screen.
onClick() → void
Called when an ad is clicked.
override
onFailedToLoad(String message) → void
Called when an ad is failed to load.
override
onImpression() → void
Called when an ad is shown on the screen for the first time.
override
onLoaded() → void
Called when an ad is loaded.
override
onOpen() → void
Called when an ad starts an Intent.
override
onRewardEarned(int rewardAmount, String rewardType) → void
Called when the user has earned a reward.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited