Skip to content

Commit

Permalink
Update admob_service.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
sorydima authored May 29, 2024
1 parent 599d3a6 commit 8c5b230
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/widgets/admob_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ class AdMobService {
}

/// Load an AppOpenAd.
void loadOpenAd() {
AppOpenAd.load(
adUnitId: openAdId,
orientation: AppOpenAd.orientationPortrait,
request: const AdRequest(),
adLoadCallback: AppOpenAdLoadCallback(
onAdLoaded: (ad) {
_appOpenLoadTime = DateTime.now();
_appOpenAd = ad;
},
onAdFailedToLoad: (error) {
// Handle the error.
},
),
);
}
// void loadOpenAd() {
// AppOpenAd.load(
// adUnitId: openAdId,
// orientation: AppOpenAd.orientationPortrait,
// request: const AdRequest(),
// adLoadCallback: AppOpenAdLoadCallback(
// onAdLoaded: (ad) {
// _appOpenLoadTime = DateTime.now();
// _appOpenAd = ad;
// },
// onAdFailedToLoad: (error) {
// // Handle the error.
// },
// ),
// );
// }

/// Whether an ad is available to be shown.
bool get isAdAvailable {
Expand Down

0 comments on commit 8c5b230

Please sign in to comment.