stringVariation static method Null safety

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

Returns the value of flag flagKey for the current context as a string.

Will return the provided defaultValue if the flag is missing, not a string, or if some error occurs.

Implementation

static Future<String> stringVariation(String flagKey, String defaultValue) async {
  String? result = await _channel.invokeMethod('stringVariation', {'flagKey': flagKey, 'defaultValue': defaultValue });
  return result ?? defaultValue;
}