NativeAdEvent enum Null safety

The events a NativeAdController can receive. Listen to the events using controller.onEvent.listen((event) {}).

Avaiable events:

  • loading (When the ad starts loading)
  • loaded (When the ad is loaded)
  • loadFailed (When the ad failed to load)
  • muted (When the ad is dismissed)
  • undefined (When it receives an unknown error)

For more info, read the documentation

Inheritance

Constructors

NativeAdEvent()
const

Values

loadFailed → const NativeAdEvent

Called when an ad request failed.

You can see the error codes here

For more info, read the documentation

const NativeAdEvent(0)
loaded → const NativeAdEvent

Called when an ad is received.

For more info, read the documentation

const NativeAdEvent(1)
loading → const NativeAdEvent

Called when the ad starts loading

For more info, read the documentation

const NativeAdEvent(2)
muted → const NativeAdEvent

Called when the ad is muted, in other words, when the user closes the ad

Default mute this ad

If you don't want to use the default mute this ad, read the documentation on how to create a custom mute this ad

const NativeAdEvent(3)
undefined → const NativeAdEvent

Called when the event is unkown (usually for rebuilding ui)

const NativeAdEvent(4)

Properties

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

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<NativeAdEvent>
A constant List of the values in this enum, in order of their declaration.
[loadFailed, loaded, loading, muted, undefined]