Last updated:
0 purchases
optimizely plugin
optimizely_plugin #
Flutter 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 #
This plugin is work in progress and as of right now has a very limited functionality focused on solely on Optimizely rollouts.
Two functions are supported:isFeatureEnabled and getAllFeatureVariables.
import 'package:optimizely_plugin/optimizely_plugin.dart';
...
await OptimizelyPlugin.initOptimizelyManager('your_optimizely_sdk_key');
bool featureEnabled = await OptimizelyPlugin.isFeatureEnabled('your_flag', '[email protected]');
...
Map<String, dynamic> variables = await OptimizelyPlugin.getAllFeatureVariables(
'your_flag_with_vars',
'[email protected]',
{'attribute_key': attribute_value},
);
String variable_value = variables['variable_name'];
copied to clipboard
The example application shows how to use these functions in more detail. Before you can run the sample application you would need to:
create Optimizely rollouts project and get the SDK key for the environment you want to test
create a simple flag
create a flag with variables
Installation #
Add optimizely_plugin as a dependency in your project's pubspec.yaml
dependencies:
optimizely_plugin: ^0.1.0
copied to clipboard
Then run flutter pub get in your project directory
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.