File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
packages/firebase_remote_config Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 0.2.0+7
2+
3+ * Fix ` Bad state: Future already completed ` error when initially
4+ calling ` RemoteConfig.instance ` multiple times in parallel.
5+
16## 0.2.0+6
27
38* Update documentation to reflect new repository location.
Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ class RemoteConfig extends ChangeNotifier {
3333 /// Gets the instance of RemoteConfig for the default Firebase app.
3434 static Future <RemoteConfig > get instance async {
3535 if (! _instanceCompleter.isCompleted) {
36- _getRemoteConfigInstance ();
36+ _instanceCompleter. complete ( await _getRemoteConfigInstance () );
3737 }
3838 return _instanceCompleter.future;
3939 }
4040
41- static void _getRemoteConfigInstance () async {
41+ static Future < RemoteConfig > _getRemoteConfigInstance () async {
4242 final Map <String , dynamic > properties =
4343 await channel.invokeMapMethod <String , dynamic >('RemoteConfig#instance' );
4444
@@ -53,7 +53,7 @@ class RemoteConfig extends ChangeNotifier {
5353 instance._remoteConfigSettings = remoteConfigSettings;
5454 instance._parameters =
5555 _parseRemoteConfigParameters (parameters: properties['parameters' ]);
56- _instanceCompleter. complete ( instance) ;
56+ return instance;
5757 }
5858
5959 static Map <String , RemoteConfigValue > _parseRemoteConfigParameters (
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ description: Flutter plugin for Firebase Remote Config. Update your application
33 re-releasing.
44author :
Flutter Team <[email protected] > 55homepage : https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_remote_config
6- version : 0.2.0+6
6+ version : 0.2.0+7
77
88dependencies :
99 flutter :
You can’t perform that action at this time.
0 commit comments