blender_sdk
This is a
Mobile Ad Library - Blender
package provided by Webloyalty for implementation inFlutter
applications of our partners
Getting Started
The Blender SDK works with an array of "banner objects" that are provided by the API. One of the properties of a banner object tells us of whether this specific banner is an inline banner (intended to be displayed within the contents of a screen) or a full-screen banner (intended to be displayed in a full-screen modal).
Currently blender_sdk assumes that the array of banners will only return one active banner of each type. If this is found out to be incorrect, then the implementation needs to be updated.
Installation
- Install the package
flutter pub add blender_sdk
Usage
There is two types of banners what you can implement
- Inline banner:
import 'package:blender_sdk/blender_sdk.dart';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: InlineBannerWidget(hashId: hashId)
),
);
}
- Overlay banner:
import 'package:blender_sdk/blender_sdk.dart';
// You can call showOverlayBanner function when you want to show the banner for example on a button press
Container(
width: double.infinity,
child: ElevatedButton(
onPressed: () {
BannerHelper().showOverlayBanner(context, hashId);
},
child: Text("Show Banners"),
))
To enabe and disable logging
// default value is false
void main() {
BannerLogger.isLoggingEnabled = true;
runApp(const MyApp());
}
Parameters
parameter | type | required |
---|---|---|
hashId | string | yes |
keywords | string | no |