Remote Config

Update strings, numbers, booleans, and JSON in your Flutter app from the dashboard — no new build required.

How remote config works

Remote config values are fetched as part of the bootstrap snapshot on SDK init and cached locally. Like feature flags, they are evaluated client-side with no runtime network overhead.

Use remote config to control anything that might need to change without a new app release — API endpoints, UI copy, price values, timeouts, feature thresholds, or any other variable your app reads at runtime.

Reading config values

All config accessors are type-safe and require a fallback value. The fallback is returned if the key doesn't exist or the SDK hasn't loaded yet.

lib/config.dartDart
// String
final apiUrl = Koolbase.config.getString(
  'api_base_url',
  fallback: 'https://api.myapp.com',
);

// Integer
final timeout = Koolbase.config.getInt(
  'request_timeout_seconds',
  fallback: 30,
);

// Double
final discount = Koolbase.config.getDouble(
  'promo_discount_percent',
  fallback: 0.0,
);

// Boolean
final darkMode = Koolbase.config.getBool(
  'force_dark_mode',
  fallback: false,
);

// JSON map
final theme = Koolbase.config.getMap(
  'app_theme',
  fallback: {'primary': '#3B82F6'},
);

// JSON list
final allowedCountries = Koolbase.config.getList(
  'allowed_countries',
  fallback: ['US', 'GB', 'CA'],
);

Common use cases

API endpoint switching

Update base URLs when migrating infrastructure without a new release.

Pricing and promotions

Change discount values, subscription prices, or promo end dates instantly.

UI copy and labels

Fix typos, update button text, or localise strings without going through the App Store.

Rate limits and thresholds

Tune retry counts, timeout durations, or pagination limits without code changes.

Feature thresholds

Control score cutoffs, recommendation counts, or algorithm parameters dynamically.

Always use fallbacks

Every config accessor requires a fallback. This ensures your app works correctly even if:

The key hasn't been created in the dashboard yet
The SDK failed to load on first launch (no network)
The app is running offline and the cached value has expired
The key was accidentally deleted from the dashboard

Fallbacks are your safety net

Never use remote config for values where a missing or wrong value would cause a crash. Always design the fallback to be a safe, working default.

Creating config keys in the dashboard

Navigate to your project → Remote Config → New Config Key. Set the key name, value type, and value. Changes propagate within one polling cycle.

Supported value types:
  string   — text values, URLs, copy, labels
  number   — integers and decimals
  boolean  — true/false toggles
  json     — maps and lists