Open OrcunJoyoLabs opened 4 days ago
Thanks for the report, we are taking a look
Interesting, it looks like the only difference between your callsite and our internal test for this is specifying a default value. So we do:
var store =
Statsig.getParameterStore(name, disableExposureLogging: noExposure);
return store.get("parameter_name", []);
So ill continue to look at this in the case a default is not provided. But if you provide even just an empty array, this should work
Thank you for the response @tore-statsig.
Have you had a chance to take a look at the cases I have shared above? If you look at example #4, it returns only the default value when I provide a default, it never returns the existing value from the store.
Also there's the broader problem of typing / casting here. It's super confusing and error prone, as I shared with other examples. store.get("parameter_name", []); completely loses the type, and casting messes things up. Ideally all 6 cases above should return me the correct value.
I will actually give you a yet another interesting data point
Try passing a non-empty list as the default value e.g.
var store =
Statsig.getParameterStore(name, disableExposureLogging: noExposure);
return store.get("parameter_name", ["123"]);
This will always return you the default value you passed.
Description
When attempting to retrieve array values from Parameter Store using the Statsig Dart SDK (v1.2.1), the API consistently returns null or default values, even for the most basic retrieval attempts. This appears to be a fundamental issue with array handling. The parameter "enabled_values" is configured as a static string array in Parameter Store with values like:
Current Behavior
Basic retrieval returns null:
Direct casting to List returns null:
Casting to List returns null:
Using default value returns only the default:
Explicit casting to List using the API, throws
Current workaround (explicit List typing) (Works):
Expected Behavior
The basic get() call should return the configured array value from the Parameter Store.
Environment
Statsig Dart SDK Version: 1.2.1 Dart SDK Version: 3.5.3 Platform: Dart/Flutter Parameter Store Configuration: Static string array value