variationDetail method
Implementation
@override
Future<Decision> variationDetail(
int experimentKey, {
HackleUser? user,
}) async {
try {
final Map<String, Object?> arguments = {
Argument.experimentKey.value: experimentKey,
Argument.user.value: user?.toMap(),
};
final Map<dynamic, dynamic> result = await methodChannel.invokeMethod(
Method.variationDetail.value,
arguments,
);
return result.toDecision();
} catch (e) {
log("Failed to variationDetail", level: 3, error: e);
return Decision.of(
variation: Variation.A, reason: DecisionReason.EXCEPTION);
}
}