jsonVariation method
Returns the value of flag flagKey for the current context as an LDValue.
Will return the provided defaultValue if the flag is missing, or if some error occurs.
Implementation
LDValue jsonVariation(String flagKey, LDValue defaultValue) {
return _hookRunner
.withEvaluation(
flagKey,
_context,
defaultValue,
VariationMethodNames.jsonVariation,
() => _variationInternal(flagKey, defaultValue, isDetailed: false),
environmentId: _flagManager.environmentId,
)
.value;
}