· 3 years ago · May 30, 2022, 05:00 AM
1GrowthBookSDK initializeSDK(Map<String, String> userAttr) {
2 GrowthBookSDK growthBookSDK = GBSDKBuilderApp(
3 apiKey: "this is api key",
4 hostURL: 'https://cdn.growthbook.io/api/features/this is api key',
5 attributes: userAttr,
6 growthBookTrackingCallBack: (experiment, experimentResult) {
7 /// Track feature.
8 })
9 .initialize()
10 ..afterFetch = () {
11 print('success fetch');
12 };
13 print(growthBookSDK.feature("param").value);
14 return growthBookSDK;
15}