Flutter plugin for Optimizely native SDKs

Overview

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', '[email protected]');
...
Map<String, dynamic> variables = await OptimizelyPlugin.getAllFeatureVariables(
  'your_flag_with_vars',
  '[email protected]',
  {'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.3

Then run flutter pub get in your project directory

Comments
  • Migration to null safety

    Migration to null safety

    Reopened:

    Hi there,

    I just migrated to null safety the plugin regarding this policygenius#10

    I hope you can take a look and left some comments if needed. @maxnovak @longhorn499

    Best.

    Description

    Motivation and Context

    It's required to be able to migrate to dart null safety.

    10

    Type of Change:

    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [X] Maintenance or Refactor

    Checklist

    • [ ] I added tests to cover my changes
    • [ ] I rebased changes with master so that they can be merged easily
    • [ ] I have updated the documentation accordingly (if applicable)
    opened by afermin 6
  • Async init

    Async init

    Description

    Added what Optimizely calls asynchronous manager initialization.

    Motivation and Context

    There are cases when we need to make sure that the datafile is downloaded first before we return from manager initialization function. This addition allows just that. More info can be found here.

    Type of Change:

    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] Maintenance or Refactor

    Checklist

    • [ ] I added tests to cover my changes
    • [ ] I rebased changes with master so that they can be merged easily
    • [ ] I have updated the documentation accordingly (if applicable)
    opened by vkatz-pg 1
  • Update CHANGELOG, fix publish warning, package description

    Update CHANGELOG, fix publish warning, package description

    Description

    Just a few small changes after releasing the newest version yesterday:

    • Updated the official CHANGELOG
    • Removed upperbound for flutter version in pubspec (dart publish pointed out this was redundant)
    • Update description in pubspec (https://pub.dev/packages/optimizely_plugin/score)
    Screen Shot 2021-04-21 at 3 37 16 PM

    Type of Change:

    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [x] Maintenance or Refactor

    Checklist

    • [ ] I added tests to cover my changes
    • [ ] I rebased changes with master so that they can be merged easily
    • [x] I have updated the documentation accordingly (if applicable)
    opened by kevin49999 0
  • updated version

    updated version

    Description

    Motivation and Context

    TICKET_ID

    Type of Change:

    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [ ] Maintenance or Refactor

    Checklist

    • [ ] I added tests to cover my changes
    • [ ] I rebased changes with master so that they can be merged easily
    • [ ] I have updated the documentation accordingly (if applicable)
    opened by vkatz-pg 0
  • added makefile

    added makefile

    Description

    Adding the command to run github actions locally

    Type of Change:

    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [x] Maintenance or Refactor

    Checklist

    • [ ] I added tests to cover my changes
    • [ ] I rebased changes with master so that they can be merged easily
    • [ ] I have updated the documentation accordingly (if applicable)
    opened by vkatz-pg 0
  • Create ci.yaml

    Create ci.yaml

    Add GitHub action that runs flutter tests on PR and also creates a starting point to add more.

    Description

    Add ci.yaml to support running flutter tests on PRs to main

    Motivation and Context

    We have tests we're running locally but should run before PRs are merged, it's also a nice starting point for adding more GHAs (release, etc.)

    Type of Change:

    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)
    • [x] Maintenance or Refactor

    Checklist

    • [ ] I added tests to cover my changes
    • [x] I rebased changes with master so that they can be merged easily
    • [ ] I have updated the documentation accordingly (if applicable)
    opened by kevin49999 0
  • Datafile related changes

    Datafile related changes

    • datafile added as part of example project assets
    • Passing datafile string to plugin
    • updated examples to reflect the example datafile: https://docs.developers.optimizely.com/full-stack/docs/example-datafile

    @vkatz-pg I just need your help with the Android adjustment here (having the native code there use the datafile argument string rather than the json file in the Android project)

    Screenshot

    Simulator Screen Shot - iPhone 12 - 2020-12-08 at 14 24 54

    opened by kevin49999 0
  • Not Implemented crash

    Not Implemented crash

    Screen Shot 2021-06-30 at 1 18 53 PM

    We are using 0.1.3 and observed this crash coming from onDetachedFromActivity in OptimizelyPlugin.kt link to code

    I didn't think a TODO would crash an app, but I thought I'd let you know about it.

    opened by steven-spiel 1
Releases(v0.1.3)
  • v0.1.3(Apr 20, 2021)

    • Tests running and passing on latest Dart release 2.0.5
    • Migrate to null safety as detailed here: https://dart.dev/null-safety/migration-guide#step2-migrate

    Ty to @afermin for the update with PR #11 🙏

    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Jan 21, 2021)

    Added asynchronous initialization as described here: https://docs.developers.optimizely.com/full-stack/docs/initialize-sdk-android#section-asynchronous-initialization

    Source code(tar.gz)
    Source code(zip)
  • 0.1.1(Dec 15, 2020)

  • 0.1.0(Dec 9, 2020)

    Initial release for this package. Has support for using the native Optimizely SDK's to check if a feature is enabled and fetch feature variables.

    Source code(tar.gz)
    Source code(zip)
Owner
Policygenius
Policygenius
A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.

Ably Flutter Plugin A Flutter plugin wrapping the ably-cocoa (iOS) and ably-java (Android) client library SDKs for Ably, the platform that powers sync

Ably Realtime - our client library SDKs and libraries 46 Dec 13, 2022
Tribally SDKs enable your users to create communities and bring in more people to talk about the things they love.

tribally Tribally SDKs enable your users to create communities and bring in more people to talk about the things they love. Getting Started This proje

Horum 0 Dec 28, 2021
dna, dart native access. A lightweight dart to native super channel plugin

dna, dart native access. A lightweight dart to native super channel plugin, You can use it to invoke any native code directly in contextual and chained dart code.

Assuner 14 Jul 11, 2022
how to Integrating facebook audience network to flutter app for banner, interstitial, rewarded, native and native banner

fb_ads_flutter_12 A new Flutter project. Getting Started Watch the complite tutorial for integrating Facebook ads into the Flutter app in our Youtube

null 4 Nov 26, 2022
Flutter native ads - Show AdMob Native Ads use PlatformView

flutter_native_ads Flutter plugin for AdMob Native Ads. Compatible with Android and iOS using PlatformView. Android iOS Getting Started Android Androi

sakebook 64 Dec 20, 2022
react-native native module for In App Purchase.

Documentation Published in website. Announcement Version 8.0.0 is currently in release candidate. The module is completely rewritten with Kotlin and S

dooboolab 2.3k Dec 31, 2022
FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts

中文文档 中文介绍 Release Note v3.0-preview.17 PS: Before updating the beta version, please read the CHANGELOG to see if there are any BREAKING CHANGE Flutter

Alibaba 6.3k Dec 30, 2022
A flutter plugin for retrieving, creating, saving, and watching contacts on native devices

flutter_contact A Flutter plugin to access and manage the device's native contacts. Usage To use this plugin, add flutter_contact as a dependency in y

Sunny 79 Nov 23, 2022
Plugin to integrate native firebase admob to Flutter application

flutter_native_admob Plugin to integrate Firebase Native Admob to Flutter application Platform supported: iOS, Android Getting Started For help gettin

Duy Duong 63 Dec 21, 2022
Plugin that allow Flutter to communicate with a native WebView.

interactive_webview Plugin that allow Flutter to communicate with a native WebView. Warning: This is not a display WebView. This plugin is designed to

Duy Duong 46 Dec 15, 2022
The @Flutter Plugin to show native toast on Android

Native Toast The Flutter Plugin to show native toast on Android. How it works? The native_toast plugin works on the basis of the Toast class. in Andro

Mihir Paldhikar 4 Jan 3, 2023
A new flutter plugin with native wrappers that attempts to prove data transfer over sound by means of Frequency modulation

A new flutter plugin with native wrappers that attempts to prove data transfer over sound by means of Frequency modulation

Chiziaruhoma Ogbonda 36 Aug 31, 2022
A Flutter plugin that lists native gallery items.

Media Gallery plugin for Flutter A Flutter plugin that lists native gallery items. Installation First, add media_gallery as a dependency in your pubsp

Aloïs Deniel 84 Dec 7, 2022
Admob Flutter plugin that shows banner ads using native platform views.

Looking for Maintainers. Unfortunately I haven't been able to keep up with demand for features and improvments. If you are interested in helping maint

Kevin McGill 418 Dec 3, 2022
A Flutter plugin for the native FingerprintJS Pro libraries

FingerprintJS Pro Flutter Official Flutter plugin for 100% accurate device identification, created for the FingerprintJS Pro Server API. This plugin c

FingerprintJS 25 Dec 24, 2022
A plugin that brings native iOS keyboard behavior to Flutter.

iKeyboard A plugin that brings native iOS keyboard behavior to Flutter. Getting Started Just put IKeyboard as MaterialApp ancestor and put IKeyboard.b

Jonny Borges 1 May 4, 2022
A powerful plugin that fully uses the native image library's ability to display images on the flutter side.

PowerImage A powerful plugin that fully uses the native image library's ability to display images on the flutter side. 中文文档 Features: Supports the abi

Alibaba 422 Dec 23, 2022
Flutter plugin for Firebase Auth UI. Supports popular auth providers by using native SDK for Android and iOS.

firebase_auth_ui Flutter plugin of Firebase UI which allows to add login/sign-up quickly. NOTE: This plugin is under development. Please provide Feedb

Sandip Fichadiya 50 Mar 23, 2022
A flutter plugin to support drag-out functionality on native platforms

flutter_native_drag_n_drop A flutter plugin to support the native drag and drop, especially to drag files (only files) out of the application boundary

Skalio GmbH 5 Oct 28, 2022