Firebase Remote Config in Flutter allows you to change app behavior and UI values remotely, without publishing a new app version. It is commonly used for feature flags, UI tweaks, limits, and temporary switches controlled from Firebase.
Mobile releases are slow and risky.
Remote Config lets you:
It acts as a safety layer between releases.
Remote Config stores key–value pairs in Firebase.
The Flutter app:
getBool, getString, etc.).If fetching fails, the app falls back to defaults.
Use Remote Config when:
Avoid Remote Config when:
Remote Config is cached.
By default, values are fetched at most once every 12 hours. This often confuses developers during testing.
In development, reduce the interval:
await remoteConfig.setConfigSettings(
RemoteConfigSettings(
fetchTimeout: const Duration(minutes: 1),
minimumFetchInterval: const Duration(minutes: 0),
),
);On production, increase it again to several hours to avoid unnecessary network usage.
Always define defaults in code using setDefaults.
The app should work correctly before any remote fetch succeeds.
Calling fetchAndActivate() while the user is on a screen can cause visible UI changes (text, colors, layout). This looks like a glitch.
Remote Config supports live updates via onConfigUpdated.
This is useful for:
It should be used carefully to avoid unexpected UI changes.
12 min • Jul 27, 2023
Read about the LeanCode approach to Flutter architecture. We highlight some of the design decisions that should be made when developing a feature in mobile apps. This includes our approach to dependency injection, state management, widget lifecycle, and data fetching.
16 min. • Jul 17, 2023
Building an enterprise-scale application in Flutter, as in any other framework, requires a specific approach toward organizing the team and the code they create. This comprehensive tech article explains how to approach such a large-scale project.