Feature flags
Deterministic percentage rollouts and multivariate flags, evaluated against your own user context.
A flag is on or off — or one of several variants — per person, decided by rules you set in the console (property conditions, percentage rollout). Bucketing is deterministic: the same person always lands in the same bucket, on every device and server.
Evaluate once, read many
One evaluation returns every flag for the person. Read the result instead of asking again.
await context.nexus.flags.load(properties: {'plan': 'pro'}); // after identify
final flags = context.nexus.flags;
flags.isEnabled('new_checkout'); // bool
flags.variant('paywall'); // String?
flags.payload('paywall'); // Object? (attached JSON)
flags.all; // Map<String, Object?>When to re-evaluate
- After
identify— the person changed. - When a targeting property changes (plan upgraded, country changed).
- On app foreground for long-lived sessions, if rollouts change often.
Failure behaviour
A flag check is a decision point, not a data fetch. The convenience helpers fall
back to your default when Nexus is unreachable or the environment's evaluation
limit is reached (an empty evaluation means "limit hit", not "all off"). The
explicit evaluate calls still raise, so you can handle it where it matters.
Flags or Remote Config?
Use flags for who gets a feature. Use Remote Config for typed values — a fee, a phone number, a copy string — that change without a release.
