Identify resolved value source for a particular key #6707
Unanswered
kristijorgji
asked this question in
Feature request
Replies: 1 comment 1 reply
-
Do what you need to do. That’s not me
…On Mon, Jul 26, 2021 at 6:56 AM Kristi Jorgji ***@***.***> wrote:
Currently we can get values like this
_remoteConfig.getBool('test');
and also set defaults before fetch and activate
_remoteConfig.setDefaults({
'test': false
});
``
In my result of _remoteConfig.getBool('test') I will receive false when no value is configured in remote config ui for key `test`, that is correct, however for many purposes we need to know if the false is a default value or is set false in remote config.
Currently I see no way how to check something like `_remoteConfig.configExists('test')`
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6707>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANVNQLIGHIJMUHSR7TEGLOLTZU5PPANCNFSM5A73FKSQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently we can get values like this
and also set defaults before fetch and activate
In my result of _remoteConfig.getBool('test') I will receive false when no value is configured in remote config ui for key
test
, that is correct, however for many purposes we need to know if the false is a default value or is set false in remote config.Currently I see no way how to check something like
_remoteConfig.keyExists('test')
Or like in firebase remote config library for other languages, where is nicely possible like this
How can i do the same for the dart flutter library ?, so check if source is the remote config or the default value i set, or the type default value string '' bool false and so on
We have build wrapper against firebase remote config to allow more granular specification of defaults, not everything in one place as have huge configs and this will make it possible.
we work like
getKey(key, defaultValue)
if defaultValue is not specified, then we want to use ones specified in default configs of firebaese remote, if specified use that. That is basically one use case that will enable this feature to make life easier and set defaults where needed, in the code which is fetching the config key alsoCurrently is impossible to know if
false
was specified in remote config, or is the default value or type default, and if we can replace it with wrapperdefaultValue=true
for example ...Or, extend your functions
getString|getBool|getInt|...
with a second optional parameter named defaultValue, if that is specified then takes priority over default specified insetDefaults
method.Then would be easy like this
Beta Was this translation helpful? Give feedback.
All reactions