diff --git a/packages/firebase_remote_config/firebase_remote_config/android/src/main/java/io/flutter/plugins/firebase/firebaseremoteconfig/FirebaseRemoteConfigPlugin.java b/packages/firebase_remote_config/firebase_remote_config/android/src/main/java/io/flutter/plugins/firebase/firebaseremoteconfig/FirebaseRemoteConfigPlugin.java index fac40f28391f..9a3e53e07191 100644 --- a/packages/firebase_remote_config/firebase_remote_config/android/src/main/java/io/flutter/plugins/firebase/firebaseremoteconfig/FirebaseRemoteConfigPlugin.java +++ b/packages/firebase_remote_config/firebase_remote_config/android/src/main/java/io/flutter/plugins/firebase/firebaseremoteconfig/FirebaseRemoteConfigPlugin.java @@ -128,10 +128,7 @@ private void tearDownChannel() { channel = null; eventChannel.setStreamHandler(null); eventChannel = null; - for (ConfigUpdateListenerRegistration listener : listenersMap.values()) { - listener.remove(); - listenersMap.remove(listener); - } + removeEventListeners(); } private FirebaseRemoteConfig getRemoteConfig(Map arguments) {