AdEventType enum Null safety

The AdEventType relates to different callbacks from FairBid SDK.

Inheritance

Constructors

AdEventType()
const

Values

available → const AdEventType

Ad for placement became available for showing.

Triggered for AdType.interstitial and AdType.rewarded placements.

const AdEventType(0)
unavailable → const AdEventType

Ad for placement is not available yet.

Usually this may be caused by no-fill answer from mediated ad networks or network connection issues.

Triggered for AdType.interstitial and AdType.rewarded placements.

const AdEventType(1)
hide → const AdEventType

Ad was hidden and is no longer visible.

Triggered for AdType.banner placements.

const AdEventType(2)
click → const AdEventType

Ad was clicked by the user.

Triggered for placements of all AdTypes.

const AdEventType(3)
load → const AdEventType

Ad was successfully loaded.

Triggered for AdType.banner placements.

const AdEventType(4)
show → const AdEventType

Ad was successfully shown to the user.

Triggered for placements of all AdTypes.

const AdEventType(5)
showFailure → const AdEventType

Ad was not shown to the user due some error.

Triggered for AdType.interstitial and AdType.rewarded placements.

const AdEventType(6)
completion → const AdEventType

Rewarded ad was watched by the user.

Triggered for AdType.rewarded placements only. The AdEvent.payload list contains a bool value at index 0 that reflects whether user should be rewarded for watching the ad.

bool? isUserRewarded(AdEvent event) {
  if (event.eventType == AdEventType.completion) {
    return event.payload![0] as bool;
  }
  return null;
}
const AdEventType(7)
error → const AdEventType

An error occurred while loading a banner ad.

Triggered for AdType.banner placements.

const AdEventType(8)
request → const AdEventType

Request for ad has been started.

Triggered for placements of all AdTypes.

const AdEventType(9)

Properties

hashCode int
The hash code for this object.
read-onlyinherited
index int
A numeric identifier for the enumerated value.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<AdEventType>
A constant List of the values in this enum, in order of their declaration.
[available, unavailable, hide, click, load, show, showFailure, completion, error, request]