https://www.growthbook.io/ logo
#announcements
Title
# announcements
b

busy-window-96391

06/28/2023, 3:20 PM
Hey guys! I hope this message finds you well. I have been using GrowthBook for feature flagging in my Flutter project, and I have a question regarding retrieving flag states when there is no internet connectivity. Currently, I am using the
gb.feature()
function to fetch the state of a feature flag. However, in situations where there is no internet connection, the function returns
null
. I was wondering if there is a way to cache the flag data and use it when there is no internet connectivity. Is there a built-in caching mechanism in GrowthBook that allows me to store and retrieve flag states locally? If not, do you have any recommendations or best practices for handling offline scenarios and preserving the feature flag states? Thank you for your assistance.
b

bored-rocket-35802

06/28/2023, 4:07 PM
Hi, we had quite a similar use case in our web app (using js client ) and our approach is to have a feature definition stored in our assets as a json and load it as a fallback option, code-wise then we always fallback to our default or preferred value
❤️ 1
15 Views