allFlags static method Null safety

Future<Map<String, LDValue>> allFlags()

Returns a map of all feature flags for the current context, without sending evaluation events to LaunchDarkly.

The resultant map contains an entry for each known flag, the key being the flag's key and the value being its value as an LDValue.

Implementation

static Future<Map<String, LDValue>> allFlags() async {
  Map<String, dynamic>? allFlagsDyn = await _channel.invokeMapMethod('allFlags');
  Map<String, LDValue> allFlagsRes = Map();
  allFlagsDyn?.forEach((key, value) {
      allFlagsRes[key] = LDValue.fromCodecValue(value);
  });
  return allFlagsRes;
}