mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
internal remote config fetch error
This commit is contained in:
parent
b2b2aa5453
commit
98c96577fb
2 changed files with 3 additions and 7 deletions
|
@ -50,14 +50,8 @@ class RemoteConfigService implements IRemoteConfigService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
Future<void> fetchConfig() => FirebaseRemoteConfig.instance.fetch();
|
||||||
Future<void> fetchConfig() async {
|
|
||||||
// https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667
|
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
|
||||||
await FirebaseRemoteConfig.instance.fetch();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
dynamic getValue(Feature feature) => FirebaseRemoteConfig.instance.getValue(feature.name).toValue(feature);
|
dynamic getValue(Feature feature) => FirebaseRemoteConfig.instance.getValue(feature.name).toValue(feature);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -26,6 +26,8 @@ class RemoteConfigProviderState extends State<RemoteConfigProvider> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
// https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667
|
||||||
|
Future.delayed(const Duration(seconds: 1)).then((_) => widget.remoteConfigService.fetchConfig());
|
||||||
_updatesSubscription = widget.remoteConfigService.onConfigUpdated().listen(
|
_updatesSubscription = widget.remoteConfigService.onConfigUpdated().listen(
|
||||||
_updateFeatures,
|
_updateFeatures,
|
||||||
onError: (e) => log(e.toString()),
|
onError: (e) => log(e.toString()),
|
||||||
|
|
Loading…
Reference in a new issue