Skip to content
Merged
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing to the Optimizely Flutter SDK
We welcome contributions and feedback! All contributors must sign our [Contributor License Agreement (CLA)](https://docs.google.com/a/optimizely.com/forms/d/e/1FAIpQLSf9cbouWptIpMgukAKZZOIAhafvjFCV8hS00XJLWQnWDFtwtA/viewform) to be eligible to contribute. Please read the [README](README.md) to set up your development environment, then read the guidelines below for information on submitting your code.

## Development process

1. Fork the repository and create your branch from master.
2. Please follow the [commit message guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines) for each commit message.
3. Make sure to add tests!
4. `git push` your changes to GitHub.
5. Open a PR from your fork into the master branch of the original repo.
6. Make sure that all unit tests are passing and that there are no merge conflicts between your branch and `master`.
7. Open a pull request from `YOUR_NAME/branch_name` to `master`.
8. A repository maintainer will review your pull request and, if all goes well, squash and merge it!

## Pull request acceptance criteria

* **All code must have test coverage.** We use Open Cover. Changes in functionality should have accompanying unit tests. Bug fixes should have accompanying regression tests.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On README.md, we have a Coveralls Badge with Unknown Coverage. Do we use Open Cover or Coveralls? Let's mention the right tool here and use the correct badge on README.md

* Tests are located in `OptimizelySDK.Tests` with one file per class.

## License

All contributions are under the CLA mentioned above. For this project, Optimizely uses the Apache 2.0 license, and so asks that by contributing your code, you agree to license your contribution under the terms of the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0). Your contributions should also include the following header:

```
/**
* Copyright YEAR, Optimizely, Inc. and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
```

The YEAR above should be the year of the contribution. If work on the file has been done over multiple years, list each year in the section above. Example: Optimizely writes the file and releases it in 2014. No changes are made in 2015. Change made in 2016. YEAR should be �2014, 2016�.

## Contact
If you have questions, please contact [email protected].

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this email still used and monitored by us?

73 changes: 59 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
[![Pub](https://img.shields.io/pub/v/optimizely_flutter_sdk.svg)](https://pub.dev/packages/optimizely_flutter_sdk)
[![Coverage Status](https://coveralls.io/repos/github/optimizely/optimizely-flutter-sdk/badge.svg?branch=master)](https://coveralls.io/github/optimizely/optimizely-flutter-sdk?branch=master)

This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
This repository houses the Flutter SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).

## Getting Started
Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).

### Using the SDK
Refer to the [Flutter SDK developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/install-sdk-flutter) for instructions on getting started with using the SDK.
Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap.

## Get Started

Refer to the [Flutter SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/flutter-sdk) for detailed instructions on getting started with using the SDK.

### Requirements

Expand All @@ -24,23 +24,27 @@ 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
### Install the SDK

### Packages

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

```
optimizely_flutter_sdk: ^1.0.0-beta
optimizely_flutter_sdk: ^1.0.1-beta
```

Then, import the package in your application code:
Then run

```
import 'package:optimizely_flutter_sdk/optimizely_flutter_sdk.dart';
flutter pub get
```

## Usage
### Configuration options

{{ List any configuration options, if the SDK has any (for example, Agent's configuration can be overwritten by a yaml config file) }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fill these in or remove the Configuration Options section


### Instantiation
## Use the Flutter SDK

A sample code for SDK initialization:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should "sample code" part go under "Initialization" section?


Expand All @@ -49,6 +53,14 @@ A sample code for SDK initialization:
var response = await flutterSDK.initializeClient();
```

### Initialization

Then, import the package in your application code:

```
import 'package:optimizely_flutter_sdk/optimizely_flutter_sdk.dart';
```

### Feature Rollouts
```
import 'package:optimizely_flutter_sdk/optimizely_flutter_sdk.dart';
Expand All @@ -68,7 +80,40 @@ A sample code for SDK initialization:
var decideReponse = await user!.decide("binary_feature");
```

## Testing in Terminal
## SDK Development

### Unit Tests

1. To run [unit tests](https://docs.flutter.dev/cookbook/testing/unit/introduction) using terminal, simply use the following command:
`flutter test test/optimizely_flutter_sdk_test.dart`

### Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md).


### Other Optimizely SDKs

- Agent - https://github.com/optimizely/agent

- Android - https://github.com/optimizely/android-sdk

- C# - https://github.com/optimizely/csharp-sdk

- Flutter - https://github.com/optimizely/optimizely-flutter-sdk

- Go - https://github.com/optimizely/go-sdk

- Java - https://github.com/optimizely/java-sdk

- JavaScript - https://github.com/optimizely/javascript-sdk

- PHP - https://github.com/optimizely/php-sdk

- Python - https://github.com/optimizely/python-sdk

- React - https://github.com/optimizely/react-sdk

- Ruby - https://github.com/optimizely/ruby-sdk

- Swift - https://github.com/optimizely/swift-sdk
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: optimizely_flutter_sdk
description: This repository houses the Flutter SDK for use with Optimizely Full Stack and Optimizely Rollouts.
description: This repository houses the Flutter SDK for use with Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts.
version: 1.0.0-beta
homepage: https://github.com/optimizely/optimizely-flutter-sdk

Expand Down