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

Commit 7a29c9c

Browse files
committed
redme
1 parent f07f06c commit 7a29c9c

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
# optimizely_plugin
1+
# optimizely_dart
22

3-
[![pub package](https://img.shields.io/pub/v/optimizely_plugin.svg)](https://pub.dev/packages/optimizely_plugin) [![pub points](https://badges.bar/optimizely_plugin/pub%20points)](https://pub.dev/packages/optimizely_plugin/score) [![likes](https://badges.bar/optimizely_plugin/likes)](https://pub.dev/packages/optimizely_plugin/score) [![popularity](https://badges.bar/optimizely_plugin/popularity)](https://pub.dev/packages/optimizely_plugin/score)
4-
5-
Flutter plugin for Optimizely native SDKs
3+
Flutter/Dart plugin for Optimizely native SDKs
64

75
## Getting Started
86

97
Currently [Optimizely](https://www.optimizely.com/) 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](https://docs.developers.optimizely.com/full-stack/docs) for [Android](https://docs.developers.optimizely.com/full-stack/docs/android-sdk) and [iOS](https://docs.developers.optimizely.com/full-stack/docs/swift-sdk).
108

119
## Usage
1210

13-
This plugin is work in progress and as of right now has a very limited functionality focused on solely on Optimizely [rollouts](https://docs.developers.optimizely.com/full-stack/docs/introduction-to-rollouts).
14-
15-
Two functions are supported:[`isFeatureEnabled`](https://docs.developers.optimizely.com/full-stack/docs/is-feature-enabled-android) and [`getAllFeatureVariables`](https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android).
11+
functions supported:
12+
[`isFeatureEnabled`](https://docs.developers.optimizely.com/full-stack/docs/is-feature-enabled-android)
13+
[`getAllFeatureVariables`](https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android).
14+
[`getVariable`](https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android).
15+
[`trackEvent`](https://docs.developers.optimizely.com/full-stack/docs/get-all-feature-variables-android).
16+
1617
```dart
1718
import 'package:optimizely_plugin/optimizely_plugin.dart';
1819
...
@@ -25,22 +26,25 @@ Map<String, dynamic> variables = await OptimizelyPlugin.getAllFeatureVariables(
2526
{'attribute_key': attribute_value},
2627
);
2728
String variable_value = variables['variable_name'];
29+
30+
var variation = await OptimizelyPlugin().getVariation('your_flag', 'some_user@xyz.com',{});
31+
32+
await OptimizelyPlugin().trackEvent('name', 'some_user@xyz.com',{});
2833
```
29-
The example application shows how to use these functions in more detail. Before you can run the sample application you would need to:
30-
31-
- create Optimizely rollouts project and get the SDK key for the environment you want to test
32-
- create a [simple flag](https://docs.developers.optimizely.com/full-stack/docs/create-feature-flags)
33-
![Simple Flag](https://user-images.githubusercontent.com/46966906/101215706-48b26f80-364c-11eb-8dc7-e8d7a0d7b861.png)
34-
- create a [flag with variables](https://docs.developers.optimizely.com/full-stack/docs/create-feature-variables)
35-
![Flag With Variables](https://user-images.githubusercontent.com/46966906/101215717-4e0fba00-364c-11eb-8e49-cd43e03a60fb.png)
3634

3735
## Installation
3836

39-
Add `optimizely_plugin` as a dependency in your project's `pubspec.yaml`
37+
Add `optimizely_dart` as a dependency in your project's `pubspec.yaml`
4038

4139
```
4240
dependencies:
43-
optimizely_plugin: ^0.1.3
41+
optimizely_dart: ^0.1.0
4442
```
4543

4644
Then run `flutter pub get` in your project directory
45+
46+
Note:
47+
The plugin is open source with contribution form HOMEX
48+
49+
Thanks:
50+
This plugin is derived from optimizely_plugin repo

0 commit comments

Comments
 (0)