Hey team! I'm seeing an issue with a gated feature...
# sdk-flutter
q
Hey team! I'm seeing an issue with a gated feature flag for certain mobileAppVersions still showing up for improper versions. Can someone help us triage the issue?
c
Hi, @quiet-alligator-84919. Yes, sure, let us check that and we will write.
It looks like you're using the
$gte
operator to gate users based on app version (e.g.,
"mobileAppVersion": { "$gte": "1.18.1" }"
). However, the
$gte
operator in
growthbook_sdk_flutter
performs numeric comparisons only using
double.tryParse(...)
. Since version strings like
"1.18.1"
cannot be parsed as valid numbers, the condition fails to evaluate correctly and instead returns the default result - true. This can unintentionally include all users in the experiment, regardless of their actual app version. To properly compare semantic version strings (e.g.,
"1.18.1"
), you should use the
$vgte
operator, which compares each version component correctly (
major.minor.patch
). To fix this, go to the Advanced Settings of your targeting condition and use the following format:
Copy code
json
{
  "mobileAppVersion": { "$vgte": "1.18.1" }
}
Please try this update and let us know if it resolves your issue.
👀 1