diff --git a/splitio/example/lib/main.dart b/splitio/example/lib/main.dart index 4e7fe9a..998a90b 100644 --- a/splitio/example/lib/main.dart +++ b/splitio/example/lib/main.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:splitio/splitio.dart'; /// Replace these with valid values -const String _apiKey = 'api-key'; +const String _sdkKey = 'sdk-key'; const String _matchingKey = 'user-id'; void main() { @@ -21,12 +21,12 @@ class SplitioExampleApp extends StatefulWidget { } class _SplitioExampleAppState extends State { - String _splitName = ''; + String _featureFlagName = ''; bool _sdkReady = false; bool _sdkReadyFromCache = false; late SplitClient _client; - final Splitio _split = Splitio(_apiKey, _matchingKey, + final Splitio _split = Splitio(_sdkKey, _matchingKey, configuration: SplitConfiguration( trafficType: "user", )); @@ -87,20 +87,20 @@ class _SplitioExampleAppState extends State { Padding( padding: const EdgeInsets.fromLTRB(32, 8, 32, 8), child: TextField( - decoration: - const InputDecoration(hintText: 'Enter split name'), + decoration: const InputDecoration( + hintText: 'Enter feature flag name'), onChanged: (text) { setState(() { - _splitName = text; + _featureFlagName = text; }); }, ), ), Visibility( - visible: _splitName != '', + visible: _featureFlagName != '', child: ElevatedButton( onPressed: performEvaluation, - child: Text('Evaluate: $_splitName')), + child: Text('Evaluate: $_featureFlagName')), ), Visibility( visible: _sdkReady || _sdkReadyFromCache, @@ -131,9 +131,8 @@ class _SplitioExampleAppState extends State { } void performEvaluation() async { - _client - .getTreatment(_splitName) - .then((value) => {print('Evaluation value for $_splitName is $value')}); + _client.getTreatment(_featureFlagName).then( + (value) => {print('Evaluation value for $_featureFlagName is $value')}); } void track() { diff --git a/splitio_platform_interface/lib/split_configuration.dart b/splitio_platform_interface/lib/split_configuration.dart index 80c55fb..8c19f9b 100644 --- a/splitio_platform_interface/lib/split_configuration.dart +++ b/splitio_platform_interface/lib/split_configuration.dart @@ -5,7 +5,7 @@ class SplitConfiguration { /// Initializes the Split configuration. /// - /// [featuresRefreshRate] the SDK polls Split servers for changes to feature splits at this rate (in seconds). + /// [featuresRefreshRate] the SDK polls Split servers for changes to feature flags at this rate (in seconds). /// /// [segmentsRefreshRate] The SDK polls Split servers for changes to segments at this rate (in seconds). /// @@ -31,7 +31,7 @@ class SplitConfiguration { /// /// [impressionListener] Enables impression listener. If true, generated impressions will be streamed in the impressionsStream() method of Splitio. /// - /// [syncConfig] Use it to filter specific splits to be synced and evaluated by the SDK. If not set, all splits will be downloaded. + /// [syncConfig] Use it to filter specific feature flags to be synced and evaluated by the SDK. If not set, all feature flags will be downloaded. SplitConfiguration({ int? featuresRefreshRate, int? segmentsRefreshRate,