InfiniteScrollEventListener class mixin
Infinite Scroll life cycle goes as follows:
- onRoll Called when the infinite scroll is about to roll for an item, this is just an event that happens before the roll or onRollFailed Called when the infinite scroll roll for an item says there is no ad in that item.
- onAdItemCreated Called when the infinite scroll roll succeeds, so we are going to create a view inside it or onAdItemFailedToCreate Called when the infinite scroll roll succeeds, but we failed to create a view inside it, this is an actual error not like onRollFailed which is just a thing that can happen due to the probability distribution of the infinite scroll configuration
- onAdItemLoaded Called when the ad that was rolled successfully for an item, actually loads and is ready to be shown or onAdItemFailedToLoad Called when the ad that was rolled successfully for an item, failed to load, also an error
- onAdItemImpression Called when the ad loaded in the item is shown for the first time
- onAdItemClick Called when the ad loaded in the item is clicked
- onAdItemOpen Called when the ad loaded in the item is opened
- onAdItemClose Called when the ad loaded in the item is closed
Constructors
- InfiniteScrollEventListener.callbacks({AdItemCallback? onRollCallback, AdItemCallback? onRollFailedCallback, AdItemCreatedCallback? onAdItemCreatedCallback, AdFailedToLoadCallback? onAdItemFailedToCreateCallback, AdItemCallback? onAdItemLoadedCallback, AdItemFailedToLoadCallback? onAdItemFailedToLoadCallback, AdItemCallback? onAdItemImpressionCallback, AdItemCallback? onAdItemClickCallback, AdItemCallback? onAdItemOpenCallback, AdItemCallback? onAdItemCloseCallback})
-
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 InfiniteScrollEventListener.
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
-
onAdItemClick(
int itemIdInData) → void - Callback for when the ad that was rolled successfully for an item, is clicked
-
onAdItemClose(
int itemIdInData) → void - Callback for when the ad that was rolled successfully for an item, is closed
-
onAdItemCreated(
int adapterId, double probability) → void - Callback for when a roll succeeds, so we are going to create a view inside it
-
onAdItemFailedToCreate(
String message) → void - Callback that happens when we are using more advanced infinite scroll techniques, where we might not find a valid wrapper inside the item
-
onAdItemFailedToLoad(
int itemIdInData, String message) → void - Callback for when the ad that was rolled successfully for an item, failed to load
-
onAdItemImpression(
int itemIdInData) → void - Callback for when the ad that was rolled successfully for an item, is shown
-
onAdItemLoaded(
int itemIdInData) → void - Callback for when the ad that was rolled successfully for an item, actually loads and is ready to be shown
-
onAdItemOpen(
int itemIdInData) → void - Callback for when the ad that was rolled successfully for an item, is opened
-
onRoll(
int itemIdInData) → void - Callback for when we roll to know if an ad should be loaded after the item, this is just an event that happens before the roll
-
onRollFailed(
int itemIdInData) → void - Callback for when a roll for an item says there is no ad in that item. Failed might be misunderstood, since is not failed in an error or warning, but the roll simply said we should not load an ad in this item, is not for error catching is just a thing that can happen due to the probability distribution of the infinite scroll configuration
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited