Skip to content

ubbop42/optimizely-dart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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', 'some_user@xyz.com');

 var variation = await OptimizelyPlugin().getVariation('your_flag', 'some_user@xyz.com',{});

await OptimizelyPlugin().trackEvent('name', 'some_user@xyz.com',{});

Installation

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

dependencies:
  optimizely_dart: ^0.1.0

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

About

Flutter plugin for Optimizely native SDKs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 33.8%
  • Swift 30.8%
  • Kotlin 26.4%
  • Ruby 8.9%
  • Objective-C 0.1%