Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

HomeX-It/optimizely-dart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

optimizely_dart Flutter 2.10.0

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

  • Swift 32.1%
  • Dart 31.3%
  • Kotlin 27.3%
  • Ruby 9.2%
  • Objective-C 0.1%