mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +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
|
||||
Future<void> fetchConfig() async {
|
||||
// https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
await FirebaseRemoteConfig.instance.fetch();
|
||||
try {
|
||||
// https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue