optimizely_plugin 0.1.3 icon indicating copy to clipboard operation
optimizely_plugin: ^0.1.3 copied to clipboard

Flutter plugin for Optimizely SDK

optimizely_plugin #

pub package pub points likes popularity

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', 'some_user@xyz.com');
...
Map<String, dynamic> variables = await OptimizelyPlugin.getAllFeatureVariables(
  'your_flag_with_vars',
  'some_user@xyz.com',
  {'attribute_key': attribute_value},
);
String variable_value = variables['variable_name'];

The example application shows how to use these functions in more detail. Before you can run the sample application you would need to:

Installation #

Add optimizely_plugin as a dependency in your project's pubspec.yaml

dependencies:
  optimizely_plugin: ^0.1.0

Then run flutter pub get in your project directory

5
likes
120
pub points
34%
popularity

Publisher

unverified uploader

Flutter plugin for Optimizely SDK

Homepage
Repository (GitHub)

Documentation

API reference

License

Icon for licenses.Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on optimizely_plugin