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.


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(
  {'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:


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

  optimizely_plugin: ^0.1.0

Then run flutter pub get in your project directory