boolVariation static method Null safety

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

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

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

Implementation

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