getTreatmentWithConfig method
Implementation
Future<SplitResult?> getTreatmentWithConfig(
String key, Map<String, dynamic> attr) async {
Map<String, dynamic> attributes = {"key": key, "attributes": attr};
try {
var data =
await _channel.invokeMethod('getTreatmentWithConfig', attributes);
return SplitResult.fromJson({
'splitName': key,
'treatment': data['treatment'],
'config': data['config'] == null ? null : jsonDecode(data['config'])
});
} catch (e, st) {
print(e);
print(st);
return null;
}
}