getTreatmentWithConfig method
Implementation
@override
Future<SplitResult> getTreatmentWithConfig(
{required String matchingKey,
required String? bucketingKey,
required String splitName,
Map<String, dynamic> attributes = const {}}) async {
Map? treatment = (await methodChannel.invokeMapMethod(
'getTreatmentWithConfig',
_buildParameters(matchingKey, bucketingKey,
{'splitName': splitName, 'attributes': attributes})))
?.entries
.first
.value;
if (treatment == null) {
return _controlResult;
}
return SplitResult(treatment['treatment'], treatment['config']);
}