optimizely_flutter_sdk 0.1.0-beta copy "optimizely_flutter_sdk: ^0.1.0-beta" to clipboard
optimizely_flutter_sdk: ^0.1.0-beta copied to clipboard

outdated

Optimizely Flutter SDK.

Optimizely Flutter SDK #

Apache 2.0 Build Status Pub Coverage Status

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

Getting Started #

Using the SDK #

Refer to the Flutter SDK developer documentation for instructions on getting started with using the SDK.

Requirements #

See the pubspec.yaml file for Flutter version requirements.

On the Android platform, the SDK requires a minimum SDK version of 14 or higher and compile SDK version of 32.

On the iOS platform, the SDK requires a minimum version of 10.0.

Other Flutter platforms are not currently supported by this SDK.

Installing the SDK #

To add the flutter-sdk to your project dependencies, include the following in your app's pubspec.yaml:

   optimizely_flutter_sdk: ^0.1.0

Then, import the package in your application code:

   import 'package:optimizely_flutter_sdk/optimizely_flutter_sdk.dart';

Usage #

Instantiation #

A sample code for SDK initialization:

   var flutterSDK = OptimizelyFlutterSdk("my_sdk_key");
   var response = await flutterSDK.initializeClient();

Feature Rollouts #

   import 'package:optimizely_flutter_sdk/optimizely_flutter_sdk.dart';

   var flutterSDK = OptimizelyFlutterSdk("my_sdk_key");

   // instantiate a client
   var response = await flutterSDK.initializeClient();

   // User attributes are optional and used for targeting and results segmentation
   var attributes = {
      "state": "California",
      "likes_donuts": true
   };
   var user = await flutterSDK.createUserContext("optimizely end user", attributes);
   var decideReponse = await user!.decide("binary_feature");

Testing in Terminal #

  1. To run unit tests using terminal, simply use the following command: flutter test test/optimizely_flutter_sdk_test.dart
7
likes
0
points
4.93k
downloads

Publisher

unverified uploader

Weekly Downloads

Optimizely Flutter SDK.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on optimizely_flutter_sdk