Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isFeatureFlagEnabled removed from BulletTrain Client #4

Open
FilledStacks opened this issue Mar 10, 2021 · 2 comments
Open

isFeatureFlagEnabled removed from BulletTrain Client #4

FilledStacks opened this issue Mar 10, 2021 · 2 comments

Comments

@FilledStacks
Copy link

The code below was what we use to use to check if a feature is enabled.

var featureEnabledValue =
        await _bulletTrainClient.isFeatureFlagEnabled(key);

What do we use now to replace this. The getFeatureFlagValue returns a key but we need a bool and don't want any magic / const strings in our app that's depending on user input.

@FilledStacks
Copy link
Author

Downgraded to 0.1.1 for now to have our app continue working. The above question is still relevant. We're hoping to get the recommended way to do this.

@printeastwoodcz
Copy link
Collaborator

printeastwoodcz commented Mar 25, 2021

@FilledStacks Hi, thanks for your questions.
If you need a value of your config flag, then you should use instead of isFeatureFlagEnabled

var featureEnabledValue =
        await _bulletTrainClient.getFeatureFlagValue(key);

if you don't have flag in your seeds then you should use

var featureEnabled =
        await _bulletTrainClient.hasFeatureFlag(key);
var value = _bulletTrainClient.isFeatureFlagEnabled(key);
if (value == null){
print('$key is not set yet');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant