buzz_booster 0.1.2 buzz_booster: ^0.1.2 copied to clipboard
BuzzBooster SDK
BuzzBooster SDK #
BuzzBooster Flutter SDK
Getting Started #
Initialize #
Initialize BuzzBooster SDK in main method
import 'package:buzz_booster/buzz_booster.dart';
final buzzBooster = BuzzBooster();
void main() async {
runApp(const MyApp());
await buzzBooster.init(
androidAppKey:"ANDROID_APP_KEY",
iosAppKey:"IOS_APP_KEY"
);
}
Set User Id #
Called when the user is logged in
await buzzBooster.setUserId("USER_ID");
Campaign #
User retention can be achieved through campaigns. Call the code below after the user logs in.
await buzzBooster.showCampaign();
In-App Message #
Use in-app messages to encourage users to participate in the campaign. Call the code below after the user logs in.
await buzzBooster.showInAppMessage();
Full source code #
import 'package:flutter/material.dart';
import 'package:buzz_booster/buzz_booster.dart';
...
final buzzBooster = BuzzBooster();
void main() async {
runApp(const MyApp());
await buzzBooster.init(
androidAppKey:"ANDROID_APP_KEY",
iosAppKey:"IOS_APP_KEY"
);
await buzzBooster.setUserId("USER_ID");
await buzzBooster.showInAppMessage();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: const Text('This is BuzzBooster Flutter Example')
floatingActionButton: FloatingActionButton(
onPressed: () async {
await buzzBooster.showCampaign();
},
backgroundColor: Colors.deepPurple,
child: const Icon(Icons.gif_box),
),
),
);
}
}
Trouble Shooting #
In case of build errors, go to the trouble shooting documentation.