Remote Config, Feature Flags, and Staged Rollouts
Toggle features remotely and roll out changes gradually without resubmitting the app.
Why Remote Config
App store review cycles are slow. If a feature ships broken, you may wait days for a hotfix to reach users. Remote configuration decouples shipping the code from turning it on.
- Feature flags gate code paths behind a boolean you control from a server.
- Remote config delivers tunable values (strings, numbers, JSON) without a new build.
- Staged rollouts expose a change to a growing percentage of users.
In Flutter the common tool is firebase_remote_config, but the same patterns apply to LaunchDarkly, ConfigCat, or your own backend.
Modeling a Flag Locally
Before wiring any SDK, model your flags as plain Dart so the rest of the app never touches raw strings. A typed config object keeps defaults explicit and makes the code testable.
This is pure Dart with sensible defaults baked in — exactly what you ship if the network is unavailable.
class AppConfig {
final bool newCheckoutEnabled;
final int maxUploadMb;
final String welcomeMessage;
const AppConfig({
this.newCheckoutEnabled = false,
this.maxUploadMb = 10,
this.welcomeMessage = 'Welcome!',
});
}
void main() {
const defaults = AppConfig();
print('checkout: ${defaults.newCheckoutEnabled}');
print('maxUploadMb: ${defaults.maxUploadMb}');
print('welcome: ${defaults.welcomeMessage}');
}All lessons in this course
- Build Flavors and Environment Configuration
- Automated Pipelines with Fastlane and GitHub Actions
- Crash Reporting and Symbolicated Stack Traces
- Remote Config, Feature Flags, and Staged Rollouts