mirror of
https://github.com/flutter/samples.git
synced 2025-11-13 00:08:24 +00:00
Flutter 3.29 beta (#2571)
This commit is contained in:
@@ -36,12 +36,15 @@ class AdsController {
|
||||
void preloadAd() {
|
||||
// TODO: When ready, change this to the Ad Unit IDs provided by AdMob.
|
||||
// The current values are AdMob's sample IDs.
|
||||
final adUnitId = defaultTargetPlatform == TargetPlatform.android
|
||||
? 'ca-app-pub-3940256099942544/6300978111'
|
||||
// iOS
|
||||
: 'ca-app-pub-3940256099942544/2934735716';
|
||||
_preloadedAd =
|
||||
PreloadedBannerAd(size: AdSize.mediumRectangle, adUnitId: adUnitId);
|
||||
final adUnitId =
|
||||
defaultTargetPlatform == TargetPlatform.android
|
||||
? 'ca-app-pub-3940256099942544/6300978111'
|
||||
// iOS
|
||||
: 'ca-app-pub-3940256099942544/2934735716';
|
||||
_preloadedAd = PreloadedBannerAd(
|
||||
size: AdSize.mediumRectangle,
|
||||
adUnitId: adUnitId,
|
||||
);
|
||||
|
||||
// Wait a bit so that calling at start of a new screen doesn't have
|
||||
// adverse effects on performance.
|
||||
|
||||
Reference in New Issue
Block a user