/
Flutter Banner
Flutter Banner
Prerequisites
Show the ad
Use the R89Banner(configurationId:...,)
widget provided by the SDK to display a banner ad.
@override
Widget build(BuildContext context) => Scaffold(
appBar: ...,
body: Column(children: [
...
R89Banner(
configurationId: ConfigBuilder.bannerTestR89ConfigId),
...
],),
);
Your configurationId
will be provided to you during onboarding process by email, you can also retrieve them from the web interface after login.
They can be many or none depending on your requests, if you need one or more please request them to your account manager or technical account manager.
Lifecycle events
You can subscribe to these events with the same method but passing a new object as a parameter. Details about this object can be found in the Reference.
@override
Widget build(BuildContext context) => Scaffold(
appBar: ...,
body: Column(children: [
...
R89Banner(
configurationId: ConfigBuilder.bannerTestR89ConfigId,
lifecycleCallbacks: BannerEventListener.callbacks(
onLoadedCallback: () {},
onImpressionCallback: () {},
onLayoutChangeCallback: (width, height) {},
onClickCallback: () {},
onOpenCallback: () {},
onCloseCallback: () {},
onFailedToLoadCallback: (error) {},)
),
...
],),
);
, multiple selections available,