Skip to content

Commit 5db5771

Browse files
authored
fix(remote-config, ios): fix hot reload issue (#18062)
1 parent 5b60210 commit 5db5771

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/firebase_remote_config/firebase_remote_config/example/lib/home_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ class _ButtonAndTextState extends State<_ButtonAndText> {
176176
padding: const EdgeInsets.all(8),
177177
child: Row(
178178
children: [
179-
Text(_text ?? widget.defaultText),
180-
const Spacer(),
179+
Expanded(child: Text(_text ?? widget.defaultText)),
180+
const SizedBox(width: 8),
181181
ElevatedButton(
182182
onPressed: () async {
183183
final result = await widget.onPressed();

packages/firebase_remote_config/firebase_remote_config/ios/firebase_remote_config/Sources/firebase_remote_config/FirebaseRemoteConfigPlugin.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public class FirebaseRemoteConfigPlugin: NSObject, FlutterPlugin, FlutterStreamH
6060
}
6161

6262
public func didReinitializeFirebaseCore(_ completion: @escaping () -> Void) {
63+
for listener in listenersMap.values {
64+
listener.remove()
65+
}
66+
listenersMap.removeAll()
6367
completion()
6468
}
6569

0 commit comments

Comments
 (0)