best-rain-36041
07/01/2025, 11:58 AMfresh-football-47124
freezing-postman-69602
07/02/2025, 12:15 AMbackgroundSync
.
Here's an example:
final sdk = await GBSDKBuilderApp(
apiKey: "your_api_key",
hostURL: "<https://your-growthbook-instance.com>",
backgroundSync: true, // This enables real-time streaming updates
growthBookTrackingCallBack: (trackData) {
// Handle experiment tracking
},
).initialize();
this establishes an SSE connection to your GrowthBook instance and updates features in real-time.freezing-postman-69602
07/02/2025, 12:16 AMsetRefreshHandler
to log or something in your app to track feature updates.best-rain-36041
07/02/2025, 9:11 AMfreezing-postman-69602
07/02/2025, 6:22 PMgrowthBookTrackingCallback
is for experiment tracking and it will not be fired for feature flag changes. You should see the refreshHandler
being fired though.
Did you notice any connection errors or app errors that may be hindering the feature refreshing process?witty-rocket-75751
07/15/2025, 10:22 AMrefreshHandler
gets fired in 2 cases for me
1. during init and
2. only if if i use gb?._refresh_();
to manually refresh.
my expectation was it should fire when i publish any new changes in an existing or new feature. i don't see any connection related logs getting printed. any thoughts on it?best-rain-36041
07/16/2025, 7:45 AMwitty-rocket-75751
07/17/2025, 6:31 AM3.9.11
should work there, was getting refresh callback on that. but with some changes for another fix after the callback feature value was getting evaluated as null for some reason.freezing-postman-69602
07/17/2025, 5:59 PMfreezing-postman-69602
07/17/2025, 6:02 PMwitty-rocket-75751
07/17/2025, 7:23 PM