initRemoteConfig function

Future<void> initRemoteConfig({
  1. String? app,
})

Binds Remote Config to an app: the default one, or the named one app. initDatabase or initNamedApp must have made the app first.

Asynchronous because the SDK's values are only meaningful once the last activated config has been brought into memory.

Each app has its own defaults, settings and values, and the SDK persists each app's defaults and fetched and activated values under its name: an app made again under the same name finds them.

Implementation

Future<void> initRemoteConfig({String? app}) {
  ensureLibraryLoaded();
  if (!hasFirebase) {
    return Future.error(StateError('this build has no Firebase SDK'));
  }
  return _awaitOutcome(app, fdbRcInit, 'initRemoteConfig');
}