tall-glass-41437
11/21/2024, 6:04 AMcalm-dog-24239
11/21/2024, 8:43 AMtall-glass-41437
11/21/2024, 11:24 PMcalm-dog-24239
11/22/2024, 4:47 PMcalm-dog-24239
11/22/2024, 4:47 PMcalm-dog-24239
11/22/2024, 4:48 PMcalm-dog-24239
11/22/2024, 4:48 PMcalm-dog-24239
11/22/2024, 4:48 PMtall-glass-41437
11/24/2024, 10:01 PMcalm-dog-24239
11/25/2024, 10:18 AMtall-glass-41437
11/26/2024, 5:40 AMcalm-dog-24239
11/26/2024, 1:47 PMtall-glass-41437
11/28/2024, 1:59 AMcalm-dog-24239
11/28/2024, 7:59 AMtall-glass-41437
12/02/2024, 5:32 AMFuture<void> initializeSDK() async {
if (_isInitialized) return; // Avoid re-initializing if already done
// Initialize GrowthBook SDK
gb = await GBSDKBuilderApp(
apiKey: 'sdk-xxx', // Replace with your actual API key
hostURL: '<https://cdn.growthbook.io/>', // Replace with your actual GrowthBook URL
growthBookTrackingCallBack: (exp, rst) {
// Handle callback if needed
},
gbFeatures: {
'flutter-pet-test': GBFeature(defaultValue: 'pet'),
},
).initialize();
// After evaluation, set the blurb text and log the value
final expressBlurb = gb?.evalFeature('flutter-pet-test');
setState(() {
// Use the actual value returned from the feature evaluation
expessBlurbText = expressBlurb?.value ?? 'Default Blurb';
// Log the value (this could be the 'control' or any variant you defined)
print('Feature Evaluation Value: ${expressBlurb?.value}');
_isInitialized = true; // Mark as initialized
});
}
I had it working some what and returning the control but now I am just getting the default text from the feature I created to set it up.
I have no real idea what I am doing so any help would be great.calm-dog-24239
12/03/2024, 8:52 AM