← Flutter Reference

What are Feature Flags in Flutter?

CI/CD · Intermediate

By Abdelrahman Saed — Senior Mobile Engineer. Last updated: 2026-08-10.

Feature flags (also called feature toggles) are a software development technique that lets you enable or disable functionality at runtime without deploying new code. In Flutter, they decouple deploy from release — you ship code dark behind a flag, then remotely enable it when ready.

How it works

A feature flag is a remote-controlled boolean (or string, or JSON) that your app checks at runtime:

if (featureFlags.isEnabled('new_checkout_flow')) {
  return NewCheckoutPage();
} else {
  return OldCheckoutPage();
}

The flag values are fetched from a remote service (GrowthBook, Firebase Remote Config, LaunchDarkly) and cached locally so the app works offline. Changing a flag on the server changes the app's behaviour for all users — or for a targeted segment — without an app store release.

At iStoria, we use GrowthBook for feature flags and A/B testing. Feature flags enable:

1. Dark launches — ship code to production behind a flag that defaults to off. Ramp when ready. 2. Percentage rollouts — enable for 5% of users, watch crash rates, then ramp to 100%. 3. Instant kill switch — a misbehaving feature is one flag flip from off, no hotfix release needed. 4. A/B testing — run two variants and measure which drives better conversion.

Combined with trunk-based development, feature flags let you merge continuously to master and choose when learners see something — instead of the app store review being the release event.

When to use it

Use feature flags when:

  • You practice trunk-based development and need to merge incomplete work dark.
  • You want to ramp features gradually (5% → 50% → 100%) to catch issues early.
  • You need an instant kill switch for production issues.
  • You run A/B tests on UI flows, pricing, or onboarding.

Skip them when:

  • The feature is small enough to ship fully complete in one PR.
  • Your team isn't ready for the operational overhead of managing flag lifecycle (flags must eventually be removed).

Strengths

  • Decouples deploy from release — ship code dark, enable when ready
  • Gradual rollouts — ramp from 5% to 100% with confidence
  • Instant kill switch — disable a broken feature without an app store release
  • A/B testing built-in — test variants against conversion metrics
  • Enables trunk-based development — the key that makes continuous integration safe

Tradeoffs

  • Flag debt — flags accumulate and must be cleaned up after a feature is fully rolled out
  • Testing complexity — you must test every combination of flag states
  • Remote dependency — if the flag service is down, the app falls back to cached defaults
  • Added indirection — understanding code paths requires knowing flag states

Comparisons

Related articles

Related case studies

FAQ

What is the difference between feature flags and A/B testing?

Feature flags control which code runs (on/off or variant). A/B testing is one use of feature flags — it assigns users to variants and measures outcomes. Every A/B test uses feature flags; not every feature flag is an A/B test. See our feature flags vs A/B testing comparison.

Which feature flag service should I use for Flutter?

GrowthBook (open-source, self-hostable) and Firebase Remote Config (free, managed by Google) are the most popular. LaunchDarkly is the enterprise option. At iStoria, GrowthBook gives us both flags and A/B testing in one SDK.


Available for hire. Abdelrahman Saed is a Senior Mobile Engineer (Flutter) — open to full-time, fractional, contract, or advisory work. Hire me →

Book a 20-minute call · Download the CV (PDF) · See how I work