getTreatmentsWithConfigByFlagSet method

  1. @override
Future<Map<String, SplitResult>> getTreatmentsWithConfigByFlagSet({
  1. required String matchingKey,
  2. required String? bucketingKey,
  3. required String flagSet,
  4. Map<String, dynamic> attributes = const {},
})

Implementation

@override
Future<Map<String, SplitResult>> getTreatmentsWithConfigByFlagSet(
    {required String matchingKey,
    required String? bucketingKey,
    required String flagSet,
    Map<String, dynamic> attributes = const {}}) async {
  Map? treatments = await methodChannel.invokeMapMethod(
      'getTreatmentsWithConfigByFlagSet',
      _buildParameters(matchingKey, bucketingKey,
          {'flagSet': flagSet, 'attributes': attributes}));

  return treatments?.map((key, value) =>
          MapEntry(key, SplitResult(value['treatment'], value['config']))) ??
      {};
}