unregisterFeatureFlagListener static method Null safety
- String flagKey,
- LDFlagUpdatedCallback flagUpdateCallback
Unregisters an LDFlagUpdatedCallback from the flagKey
flag.
Implementation
static Future<void> unregisterFeatureFlagListener(String flagKey, LDFlagUpdatedCallback flagUpdateCallback) async {
_flagUpdateCallbacks.remove(flagKey, flagUpdateCallback);
if (_flagUpdateCallbacks[flagKey].isEmpty) {
await _channel.invokeMethod('stopFlagListening', flagKey);
}
}