load method
Implementation
Future<bool> load({
bool force = false,
Duration? timeout,
}) async {
ensureAdNotDisposed();
// assertMobileAdsIsInitialized();
if (!debugCheckAdWillReload(isLoaded, force)) return false;
isLoaded = (await channel.invokeMethod<bool>('load.ads.banner').timeout(
timeout ?? loadTimeout,
onTimeout: () {
if (!onEventController.isClosed && !isLoaded) {
onEventController.add({
BannerAdEvent.loadFailed: AdError.timeoutError,
});
}
return false;
},
))!;
if (isLoaded) lastLoadedTime = DateTime.now();
return isLoaded;
}