dispose method

void dispose()
override

Dispose the ad to free up resources. Once disposed, the ad can not be used anymore

Usage:

@override
void dispose() {
  super.dispose();
  interstitialAd?.dispose();
}

Implementation

void dispose() {
  super.dispose();
  _syncExecutor.exec(() async {
    await MobileAds.pluginChannel
        .invokeMethod('disposeInterstitialAd', {'id': id});
  }, null);
}