InterstitialAd class Null safety

An InterstitialAd model to communicate with the model in the platform side. It gives you methods to help in the implementation and event tracking.

For more info, see:



InterstitialAd({String? unitId, Duration loadTimeout = kDefaultLoadTimeout, Duration timeout = kDefaultAdTimeout, bool nonPersonalizedAds = kDefaultNonPersonalizedAds})
Creates a new interstitial ad controller


channel MethodChannel
Channel to communicate with controller
read / write, inherited
hashCode int
The hash code for this object.
read-only, inherited
id String
The unique key of this class
read-only, inherited
isAvailable bool
Check if the time is available. If ad is not loaded, returns false If it has been the time of timeout since the last load, returns false
read-only, inherited
isDisposed bool
Check if the ad is disposed. You can dispose the ad by calling ad.dispose()
read-only, inherited
isLoaded bool
Check if the ad is loaded
@protected, read / write, inherited
lastLoadedTime DateTime?
@protected, read / write, inherited
loadTimeout Duration
The ad will stop loading after a specified time.
final, inherited
nonPersonalizedAds bool
Whether non-personalized ads (ads that are not based on a user’s past behavior) should be enabled.
final, inherited
onEvent Stream<Map<FullScreenAdEvent, dynamic>>
Listen to the events the ad throws
read-only, override
onEventController StreamController<Map<FullScreenAdEvent, dynamic>>
@protected, final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serverSideVerificationOptions ServerSideVerificationOptions?
Server Side Verification - Info such as userId and customData
final, inherited
timeout Duration
The time the ad can be kept loaded.
final, inherited
unitId String?
The unit id used on this ad. Can be null
final, inherited


dispose() → void
Dispose the ad to free up resources. Once disposed, the ad can not be used anymore
ensureAdAvailable() → void
@protected, inherited
ensureAdNotDisposed() → void
@protected, inherited
init() → void
Initialize the controller. This can be called only by the controller
load({String? unitId, bool force = false, Duration? timeout, bool? nonPersonalizedAds, List<String> keywords = const []}) Future<bool>
In order to show an ad, it needs to be loaded first. Use load() to load.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
show() Future<bool>
Show the interstitial ad. This returns a Future that will complete when the ad gets closed
toString() String
A string representation of this object.


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

Static Properties

testUnitId String
The test id for this ad.
videoTestUnitId String
The video test id for this ad.