@@ -18,7 +18,7 @@ Refer to the [Flutter SDK developer documentation](https://docs.developers.optim
1818
1919See the [ pubspec.yaml] ( https://github.com/optimizely/optimizely-flutter-sdk/blob/master/pubspec.yaml ) file for Flutter version requirements.
2020
21- On the Android platform, the SDK requires a minimum SDK version of 21 .
21+ On the Android platform, the SDK requires a minimum SDK version of 14 or higher and compile SDK version of 32 .
2222
2323On the iOS platform, the SDK requires a minimum version of 10.0.
2424
@@ -29,7 +29,7 @@ Other Flutter platforms are not currently supported by this SDK.
2929To add the flutter-sdk to your project dependencies, include the following in your app's pubspec.yaml:
3030
3131```
32- optimizely_flutter_sdk: ^1.0 .0
32+ optimizely_flutter_sdk: ^0.1 .0
3333```
3434
3535Then, import the package in your application code:
@@ -38,13 +38,33 @@ Then, import the package in your application code:
3838 import 'package:optimizely_flutter_sdk/optimizely_flutter_sdk.dart';
3939```
4040
41- ### Samples
41+ ## Usage
4242
43- A sample code for SDK initialization and experiments:
43+ ### Instantiation
4444
45+ A sample code for SDK initialization:
46+
47+ ```
48+ var flutterSDK = OptimizelyFlutterSdk("my_sdk_key");
49+ var response = await flutterSDK.initializeClient();
50+ ```
51+
52+ ### Feature Rollouts
4553```
54+ import 'package:optimizely_flutter_sdk/optimizely_flutter_sdk.dart';
55+
4656 var flutterSDK = OptimizelyFlutterSdk("my_sdk_key");
57+
58+ // instantiate a client
4759 var response = await flutterSDK.initializeClient();
60+
61+ // User attributes are optional and used for targeting and results segmentation
62+ var attributes = {
63+ "state": "California",
64+ "likes_donuts": true
65+ };
66+ var user = await flutterSDK.createUserContext("optimizely end user", attributes);
67+ var decideReponse = await user!.decide("binary_feature");
4868```
4969
5070## Testing in Terminal
0 commit comments