getTreatmentsByFlagSets method

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

Implementation

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

  return treatments
          ?.map((key, value) => MapEntry<String, String>(key, value)) ??
      {};
}