This repository has been archived by the owner on Mar 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 58
Banner Ad builder and placeholders
Bruno D'Luka edited this page Jan 17, 2021
·
1 revision
The builder of the ad. The ad won't be reloaded if the builder changes
BannerAd(
builder: (context, child) {
return Container(
// Applies a blue color to the background.
// You can use anything here to build the ad.
// The ad won't be reloaded
color: Colors.blue,
child: child,
);
}
)
Container(
color: Colors.blue,
child: NativeAd(),
)
If you change the Container
to something else (to a DecoratedBox
, for example), the ad will be reloaded. You can use the builder
for such things.
Loading and Error placeholders will be shown when the ad is loading or has a load error, respectively.
NativeAd(
error: Text('error'),
loading: Text('loading'),
),
You can use the controller to have better control on Ad Events.
Next: Using the controller and listening to events |
---|