Skip to content

Commit 63d9692

Browse files
committed
Default config
1 parent f3c0c2e commit 63d9692

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

splitio_platform_interface/lib/method_channel_platform.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MethodChannelPlatform extends SplitioPlatform {
3333
Map<String, Object?> arguments = {
3434
'apiKey': apiKey,
3535
'matchingKey': matchingKey,
36-
'sdkConfiguration': sdkConfiguration?.configurationMap ?? {},
36+
'sdkConfiguration': sdkConfiguration?.configurationMap ?? SplitConfiguration().configurationMap, // If sdkConfiguration is null, create a new SplitConfiguration to apply default values
3737
};
3838

3939
if (bucketingKey != null) {

splitio_platform_interface/lib/split_configuration.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class SplitConfiguration {
4343
///
4444
/// [logLevel] Enables logging according to the level specified. Options are [SplitLogLevel.verbose], [SplitLogLevel.none], [SplitLogLevel.debug], [SplitLogLevel.info], [SplitLogLevel.warning], and [SplitLogLevel.error].
4545
///
46-
/// [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.
46+
/// [readyTimeout] Maximum amount of time in seconds to wait before firing the SDK_READY_TIMED_OUT event. Defaults to 10 seconds.
4747
SplitConfiguration({
4848
int? featuresRefreshRate,
4949
int? segmentsRefreshRate,

splitio_platform_interface/test/method_channel_platform_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void main() {
351351
expect(methodArguments, {
352352
'apiKey': 'api-key',
353353
'matchingKey': 'matching-key',
354-
'sdkConfiguration': {}
354+
'sdkConfiguration': {'readyTimeout': 10}
355355
});
356356
});
357357

@@ -365,7 +365,7 @@ void main() {
365365
'apiKey': 'api-key',
366366
'matchingKey': 'matching-key',
367367
'bucketingKey': 'bucketing-key',
368-
'sdkConfiguration': {}
368+
'sdkConfiguration': {'readyTimeout': 10}
369369
});
370370
});
371371

0 commit comments

Comments
 (0)