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