boolVariation method
Returns the flag value for the current user. Returns 'fallback' when one of the following occurs:
- Flag is missing
- The flag is not of a boolean type
- Any other error
flagKey
key for the flag to evaluatefallback
fallback value in case of errors evaluating the flag
Implementation
Future<bool?> boolVariation(String flagKey, bool? fallback) async {
if (fallback == null) {
return await _channel
.invokeMethod('boolVariation', <String, dynamic>{'flagKey': flagKey});
} else {
return await _channel.invokeMethod('boolVariationFallback',
<String, dynamic>{'flagKey': flagKey, 'fallback': fallback});
}
}