Last updated:
0 purchases
optimizely dart
optimizely_dart #
Flutter/Dart plugin for Optimizely native SDKs,
Getting Started #
Currently Optimizely does not offer a dedicated flutter SDK. This flutter plugin is bridging the gap between a flutter application and the native optimizely FULL STACK SDKs for Android and iOS.
Usage #
You need to init and set up user before using any functions
functions supported:
isFeatureEnabled
getAllFeatureVariables.
getAllEnabledFeatures.
activategetVariable.
getVariable.
trackEvent.
import 'package:optimizely_dart/optimizely_dart.dart';
await OptimizelyPlugin.initOptimizelyManager('your_optimizely_sdk_key');
...
unawaited(OptimizelyPlugin().setUser(_personManager.person?.id, {'isLoggedIn':true}));
...
bool featureEnabled = await OptimizelyPlugin.isFeatureEnabled('your_flag', '[email protected]');
var variation = await OptimizelyPlugin().getVariation('your_flag', '[email protected]',{});
await OptimizelyPlugin().trackEvent('name', '[email protected]',{});
copied to clipboard
Installation #
Add optimizely_dart as a dependency in your project's pubspec.yaml
dependencies:
optimizely_dart: ^0.1.0
copied to clipboard
Then run flutter pub get in your project directory
Note:
The plugin is open source with contribution form HOMEX
Thanks:
This plugin is derived from optimizely_plugin repo
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.