iterable_flutter 0.5.8
iterable_flutter: ^0.5.8 copied to clipboard
Flutter implementation for iterable.com Cross Channel Marketing Platform
Iterable Plugin #
This library is in alpha so the implementation details could change a lot from version to version, check releases and CHANGELOG.md to know how it changes over time.
Flutter plugin to support Android and iOS push notifications from https://iterable.com/.
Usage #
To use this plugin, add iterable_flutter as a dependency in your pubspec.yaml file.
Supported methods #
| Method | Android | iOS | Web | MacOS | Windows | Linux |
|---|---|---|---|---|---|---|
initialize |
X | X | ||||
setEmail |
X | X | ||||
setUserId |
X | X | ||||
registerForPush |
X | X | ||||
updateUser |
X | X | ||||
signOut |
X | X | ||||
track |
X | X | ||||
setNotificationOpenedHandler |
X | X |
Installation #
- Add
iterable_flutteras a plugin inpubspec.yamlwith the version you need like this:
iterable_flutter: 0.5.4
- Use
IterableFlutter.initializeto set your iterable keys.
First, create a mobile API Key from Iterable. Then, also from Iterable, create a mobile app and assign a push integration to it.
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
IterableFlutter.initialize(
apiKey: <api-key>,
pushIntegrationName: <name>,
);
}
}
- Identify the user
The identification can be done either using
IterableFlutter.setEmailorIterableFlutter.setUserIdmethods. Don't set an email and user ID in the same session, doing so causes the SDK to treat them as different users.
-
Call
IterableFlutter.registerForPushto register the device for current user and listen for opened pushes withIterableFlutter.setNotificationOpenedHandler -
Track your events and optional data fields, call
IterableFlutter.trackmethod.
Example #
Check the example/ folder to see an example project using this library.