0 purchases
proba sdk flutter
proba_sdk_flutter #
Mobile framework for Proba platform.
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
proba_sdk_flutter:
copied to clipboard
Now in your Dart code, you can use:
import 'package:proba_sdk_flutter/proba_sdk_flutter.dart';
copied to clipboard
Usage #
Initialization: #
await Proba.initialize(
appId: "${YOUR_APP_ID}",
sdkToken: "${YOUR_SDK_TOKEN}",
deviceId: "${YOUR_DEVICE_ID}" // optional, UUID generated by default
appsFlyerId: "${YOUR_APPS_FLYER_UID}" // optional
amplitudeUserId: "${YOUR_AMPLITUDE_USER_ID}" // optional, if Amplitude integration is needed
defaults: {"${TEST_1_KEY}": "${TEST_1_DEFAULT_VALUE}", "${TEST_2_KEY}": "${TEST_2_DEFAULT_VALUE}"},
deviceProperties: {"installedAt": "2021-05-20T09:55:05.000+03:00"}, // optional, additional information about device
);
copied to clipboard
After initialization all functionality will be available via singleton:
Proba.instance()
copied to clipboard
How to fetch known test values that associated with your device? #
Proba.instance()!.loadExperiments((List<String> experimentsKeys) {
// Handle loaded experiments
});
copied to clipboard
How to get the value for a specific test? #
final value = Proba.instance()!.experiment("${TEST_KEY}");
copied to clipboard
In case of problems with no internet connection or another, the values obtained in the previous session will be used, or if they are missing, the default values specified during initialization will be used.
How to get user tests for analytics? #
final value = Proba.instance()!.experiments;
// or if you need additional details for experiments
final value = Proba.instance()!.experimentsWithDetails;
copied to clipboard
How to debug? #
Before debug make sure that debug-mode for your App is turned-on on settings page
In debug mode you can see all actual tests and check how the user will see each option of the test.
To show the debug bottom sheet you just need to turn it on in your personal cabinet and call
Proba.instance()!.showDebugLayer(
context: context,
valuesChangedCallback: (List<String> changedExperimentsKeys) {
// Handle changed experiments
},
);
copied to clipboard
You can enable showing debug bottom sheet by performing shake motion on your device:
Proba.instance()!.enableDebugOnShake(
context: context,
valuesChangedCallback: (List<String> changedExperimentsKeys) {
// Handle changed experiments
},
);
copied to clipboard
or disable this behavior:
Proba.instance()!.disableDebugOnShake();
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.