Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions splitio_platform_interface/lib/split_configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class SplitConfiguration {
/// [encryptionEnabled] If set to true, the local database contents is encrypted. Defaults to false.
///
/// [logLevel] Enables logging according to the level specified. Options are [SplitLogLevel.verbose], [SplitLogLevel.none], [SplitLogLevel.debug], [SplitLogLevel.info], [SplitLogLevel.warning], and [SplitLogLevel.error].
///
/// [readyTimeout] Maximum amount of time in seconds to wait before firing the SDK_READY_TIMED_OUT event. If not set, the SDK will wait indefinitely.
SplitConfiguration({
int? featuresRefreshRate,
int? segmentsRefreshRate,
Expand All @@ -67,6 +69,7 @@ class SplitConfiguration {
UserConsent? userConsent,
bool? encryptionEnabled,
SplitLogLevel? logLevel,
int? readyTimeout,
}) {
if (featuresRefreshRate != null) {
configurationMap['featuresRefreshRate'] = featuresRefreshRate;
Expand Down Expand Up @@ -167,6 +170,10 @@ class SplitConfiguration {
if (logLevel != null) {
configurationMap['logLevel'] = logLevel.name;
}

if (readyTimeout != null) {
configurationMap['readyTimeout'] = readyTimeout;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion splitio_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: splitio_platform_interface
description: A common platform interface for the splitio plugin.
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 1.2.0
version: 1.3.0-rc.1
repository: https://github.com/splitio/flutter-sdk-plugin/tree/main/splitio_platform_interface

environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ void main() {
userConsent: UserConsent.declined,
encryptionEnabled: true,
logLevel: SplitLogLevel.debug,
readyTimeout: 1
);

expect(config.configurationMap['eventFlushInterval'], 2000);
Expand Down Expand Up @@ -61,6 +62,7 @@ void main() {
expect(config.configurationMap['userConsent'], 'declined');
expect(config.configurationMap['encryptionEnabled'], true);
expect(config.configurationMap['logLevel'], 'debug');
expect(config.configurationMap['readyTimeout'], 1);
});

test('noSpecialValuesLeavesMapEmpty', () async {
Expand Down