intVariationDetails method
Implementation
Future<BKTEvaluationDetails<int>> intVariationDetails(
String featureId, {
required int defaultValue,
}) async {
final userId = await _getCurrentUserIdOrEmpty();
return valueGuard<BKTEvaluationDetails<int>>(
await _invokeMethod(CallMethods.intVariationDetails.name, argument: {
CallMethodParams.featureId: featureId,
CallMethodParams.defaultValue: defaultValue,
}),
customMapping: (response) {
return BKTEvaluationDetails.fromJson<int>(
response,
);
},
).onError((error, stackTrace) {
debugPrint("get intVariationDetails fail: ${error?.toString()}");
return BKTEvaluationDetails.createDefaultValue(
featureId, userId, defaultValue);
});
}