Flutter Tagged Wrappers
What are they?
The R89Tag
is a widget provided by the R89SDK
that allows you to define specific areas in your widget tree where ads should be placed.
They must have a required preconfigured
R89Tag
(tag:...,)
parameter, which is used byR89SDK
to locate the widget where the ad should be placed.Optionally they can have a child widget, and in that case, the ad will be placed related to the provided child widget, before or after according to configuration.
Where to add the wrappers?
Everywhere you have a white space. Tagged wrappers don’t need to contain ads, it's just for flexibility and future-proofing. Indeed, overloading your app with ads is not the best user experience, but the wrappers don’t need to be filled with ads, that’s why we recommend you add the wrappers everywhere where there is a blank space on the screen. Even if you do not want to fill them in.
We can manage which ones are and are not filled from the web interface.
Best practices when adding a wrapper
For Creating the wrappers you need to ensure the wrapper:
Do not overlap other wrappers on the app content, no matter the size it takes. if it is a space that you have a max Size to it, put it in the tag name.
Every blank space is a good space for a wrapper (even if you do not plan to use it).
Do not use only one tag for all of your wrappers, it will be hard to configure your monetization and change it according to your needs. So use as many different tags as possible (like id but you can have some of them be repeated when it makes sense)
Limitations
We can fill either all of the wrappers with a tag or just the first one we find with that tag:
if you want to differentiate any wrappers you need to assign a different tag to those. E.g.: if you want us to fill a wrapper at the bottom of the screen that has the tag ads_wrapper
we can fill that. However, if you have multiple wrappers with the same tag, and you want to fill all of them and exclude some while having the same tag, it’s not possible. We encourage you to ask for advice from our technical support on how to group wrappers.
Example
@override
Widget build(BuildContext context) =>
const Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
// ...
// The banner_tag will be replaced with the banner ad.
R89Tag(tag: 'single_tag_banner_wrapper_tag'),
// The outstream_tag will be replaced with the video outstream ad.
R89Tag(tag: 'single_tag_outstream_wrapper_tag', child: ...),
// ...
],
);