I use Growthbook to maintain my feature toggle and some other remotely configured values on my Flutter app. I successfully connect the app by using the provided SDK and connection keys.
I created some "features" on the Growthbook UI, and tested out some changes on the features, and then published the changes. However, in the client app the changes doesn't happen immediately. The client should close and reopen the app to get the new value of the features.
In the code, I only call initialize()
once, that is when the app started then use the same instance to get the value of the features at runtime.
Future<GrowthBookSDK> get gbApp => GBSDKBuilderApp(
hostURL: Env.gbHostUrl,
apiKey: Env.gbClientKey,
growthBookTrackingCallBack: (gbExperiment, gbExperimentResult) {
// TODO: adding gb analytics callback
},
).initialize();
Is there any way or configuration that can make the features update sent to the client App immediately after getting published (so the client doesn't have to reopen the app)? Or should we initialize the SDK first before getting the features value to make it happen?
Thanks in advance.