cool-apple-97384
09/22/2022, 4:47 AMhostUrl
, it's dashboard url for self hosted growthbook?
• attributes
, it's user attributes or sdk attributes? If user attributes, we need to instance SDK after login to give experiments in specific user?fresh-football-47124
cool-apple-97384
09/22/2022, 4:49 AMfresh-football-47124
cool-apple-97384
09/22/2022, 4:58 AMfresh-football-47124
cool-apple-97384
09/22/2022, 4:59 AMfresh-football-47124
cool-apple-97384
09/22/2022, 5:01 AMfresh-football-47124
glamorous-florist-39551
09/22/2022, 5:36 AMgifted-cat-24658
09/22/2022, 6:13 AMvoid updateAttr(Map<String, dynamic> attr) {
_sdkInstance.context.attributes = attr;
}
In upcoming release we will provide direct functionality to update attributes from GrowthBookSDK
.
And her _sdkInstance
is GrowthBookSDK
.cool-apple-97384
09/22/2022, 6:16 AMupdateAttr
. I just got attributes
sdkInstance.context.attributes.update
or
sdkInstance.context.attributes.updateAll
?gifted-cat-24658
09/22/2022, 6:20 AMadd
(spread over) and reset
.cool-apple-97384
09/22/2022, 6:25 AMgifted-cat-24658
09/22/2022, 6:29 AMGrowthBookSDK
and then you can use as following.
void spreadAttr({Map<String, dynamic> attributes = const {}}) {
for (var attrPair in attributes!.entries) {
_sdkInstance.context.attributes!
.putIfAbsent(attrPair.key, () => attrPair.value);
}
}
But in future releases you will able to do so from GrowthBookSDK
.cool-apple-97384
09/22/2022, 6:30 AMgifted-cat-24658
09/22/2022, 6:31 AMcool-apple-97384
09/22/2022, 6:33 AM