mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 15:30:59 +00:00
added try-catch to config fetch
This commit is contained in:
parent
c53fecd9f4
commit
45186b9430
1 changed files with 9 additions and 3 deletions
|
@ -52,9 +52,15 @@ class RemoteConfigService implements IRemoteConfigService {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> fetchConfig() async {
|
Future<void> fetchConfig() async {
|
||||||
|
try {
|
||||||
// https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667
|
// https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
await FirebaseRemoteConfig.instance.fetch();
|
await FirebaseRemoteConfig.instance.fetch();
|
||||||
|
} on FirebaseException catch (e) {
|
||||||
|
_logError('Firebase exception during Firebase Remote Config fetch: $e');
|
||||||
|
} catch (e) {
|
||||||
|
_logError('Error during Firebase Remote Config fetch: $e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
Loading…
Reference in a new issue