@@ -411,6 +411,162 @@ class SplitioWeb extends SplitioPlatform {
411411 splitName.toJS,
412412 _convertMap (attributes, true ),
413413 _convertEvaluationOptions (evaluationOptions)) as JSString ;
414+
414415 return result.toDart;
415416 }
417+
418+ @override
419+ Future <Map <String , String >> getTreatments ({
420+ required String matchingKey,
421+ required String ? bucketingKey,
422+ required List <String > splitNames,
423+ Map <String , dynamic > attributes = const {},
424+ EvaluationOptions evaluationOptions = const EvaluationOptions .empty (),
425+ }) async {
426+ final client = await _getClient (
427+ matchingKey: matchingKey,
428+ bucketingKey: bucketingKey,
429+ );
430+
431+ final result = client.getTreatments.callAsFunction (
432+ null ,
433+ splitNames.jsify (),
434+ _convertMap (attributes, true ),
435+ _convertEvaluationOptions (evaluationOptions)) as JSObject ;
436+
437+ return jsTreatmentsToMap (result);
438+ }
439+
440+ @override
441+ Future <SplitResult > getTreatmentWithConfig ({
442+ required String matchingKey,
443+ required String ? bucketingKey,
444+ required String splitName,
445+ Map <String , dynamic > attributes = const {},
446+ EvaluationOptions evaluationOptions = const EvaluationOptions .empty (),
447+ }) async {
448+ await this ._initFuture;
449+ final client = await _getClient (
450+ matchingKey: matchingKey,
451+ bucketingKey: bucketingKey,
452+ );
453+
454+ final result = client.getTreatmentWithConfig.callAsFunction (
455+ null ,
456+ splitName.toJS,
457+ _convertMap (attributes, true ),
458+ _convertEvaluationOptions (evaluationOptions)) as JSObject ;
459+
460+ return jsTreatmentWithConfigToSplitResult (result);
461+ }
462+
463+ @override
464+ Future <Map <String , SplitResult >> getTreatmentsWithConfig ({
465+ required String matchingKey,
466+ required String ? bucketingKey,
467+ required List <String > splitNames,
468+ Map <String , dynamic > attributes = const {},
469+ EvaluationOptions evaluationOptions = const EvaluationOptions .empty (),
470+ }) async {
471+ final client = await _getClient (
472+ matchingKey: matchingKey,
473+ bucketingKey: bucketingKey,
474+ );
475+
476+ final result = client.getTreatmentsWithConfig.callAsFunction (
477+ null ,
478+ splitNames.jsify (),
479+ _convertMap (attributes, true ),
480+ _convertEvaluationOptions (evaluationOptions)) as JSObject ;
481+
482+ return jsTreatmentsWithConfigToMap (result);
483+ }
484+
485+ @override
486+ Future <Map <String , String >> getTreatmentsByFlagSet (
487+ {required String matchingKey,
488+ required String ? bucketingKey,
489+ required String flagSet,
490+ Map <String , dynamic > attributes = const {},
491+ EvaluationOptions evaluationOptions =
492+ const EvaluationOptions .empty ()}) async {
493+ final client = await _getClient (
494+ matchingKey: matchingKey,
495+ bucketingKey: bucketingKey,
496+ );
497+
498+ final result = client.getTreatmentsByFlagSet.callAsFunction (
499+ null ,
500+ flagSet.toJS,
501+ _convertMap (attributes, true ),
502+ _convertEvaluationOptions (evaluationOptions)) as JSObject ;
503+
504+ return jsTreatmentsToMap (result);
505+ }
506+
507+ @override
508+ Future <Map <String , String >> getTreatmentsByFlagSets (
509+ {required String matchingKey,
510+ required String ? bucketingKey,
511+ required List <String > flagSets,
512+ Map <String , dynamic > attributes = const {},
513+ EvaluationOptions evaluationOptions =
514+ const EvaluationOptions .empty ()}) async {
515+ final client = await _getClient (
516+ matchingKey: matchingKey,
517+ bucketingKey: bucketingKey,
518+ );
519+
520+ final result = client.getTreatmentsByFlagSets.callAsFunction (
521+ null ,
522+ flagSets.jsify (),
523+ _convertMap (attributes, true ),
524+ _convertEvaluationOptions (evaluationOptions)) as JSObject ;
525+
526+ return jsTreatmentsToMap (result);
527+ }
528+
529+ @override
530+ Future <Map <String , SplitResult >> getTreatmentsWithConfigByFlagSet (
531+ {required String matchingKey,
532+ required String ? bucketingKey,
533+ required String flagSet,
534+ Map <String , dynamic > attributes = const {},
535+ EvaluationOptions evaluationOptions =
536+ const EvaluationOptions .empty ()}) async {
537+ final client = await _getClient (
538+ matchingKey: matchingKey,
539+ bucketingKey: bucketingKey,
540+ );
541+
542+ final result = client.getTreatmentsWithConfigByFlagSet.callAsFunction (
543+ null ,
544+ flagSet.toJS,
545+ _convertMap (attributes, true ),
546+ _convertEvaluationOptions (evaluationOptions)) as JSObject ;
547+
548+ return jsTreatmentsWithConfigToMap (result);
549+ }
550+
551+ @override
552+ Future <Map <String , SplitResult >> getTreatmentsWithConfigByFlagSets (
553+ {required String matchingKey,
554+ required String ? bucketingKey,
555+ required List <String > flagSets,
556+ Map <String , dynamic > attributes = const {},
557+ EvaluationOptions evaluationOptions =
558+ const EvaluationOptions .empty ()}) async {
559+ final client = await _getClient (
560+ matchingKey: matchingKey,
561+ bucketingKey: bucketingKey,
562+ );
563+
564+ final result = client.getTreatmentsWithConfigByFlagSets.callAsFunction (
565+ null ,
566+ flagSets.jsify (),
567+ _convertMap (attributes, true ),
568+ _convertEvaluationOptions (evaluationOptions)) as JSObject ;
569+
570+ return jsTreatmentsWithConfigToMap (result);
571+ }
416572}
0 commit comments