getTreatmentsWithConfig method
Implementation
Future<Map<String, SplitResult>> getTreatmentsWithConfig(
List<String> keys, Map<String, dynamic> attr) async {
Map<String, dynamic> attributes = {"keys": keys, "attributes": attr};
var data =
await _channel.invokeMethod('getTreatmentsWithConfig', attributes);
Map<String, SplitResult> finalResult = Map();
data.forEach(
(key, value) {
finalResult[key] = SplitResult.fromJson(
{
'splitName': key,
'treatment': value['treatment'],
'config':
value['config'] == null ? null : jsonDecode(value['config']),
},
);
},
);
return finalResult;
}