jsonVariation static method Null safety

Future<LDValue> jsonVariation(
  1. String flagKey,
  2. LDValue defaultValue
)

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

static Future<LDValue> jsonVariation(String flagKey, LDValue defaultValue) async {
  dynamic result = await _channel.invokeMethod('jsonVariation', {'flagKey': flagKey, 'defaultValue': defaultValue.codecValue()});
  return LDValue.fromCodecValue(result);
}