RemoteConfigSyncTask class

Startup task — fetches and activates the latest Firebase Remote Config values.

Runs in the StartupPhase.environmentAndConnectivity phase, after ConnectivityInitTask, so internet is confirmed available before the fetch.

This is a second fetch that runs on top of the silent fetch already performed during DI initialisation. It provides two resilience benefits:

  • Network recovery: if the DI-phase fetch failed because the device had no network at cold launch, this task succeeds now that connectivity is confirmed, ensuring the app starts with current config values (including the min_build_number key read by AppVersionCheckTask).
  • Freshness: in staging (minimumFetchInterval = zero) this always retrieves the latest console values; in production it refreshes once the 12-hour cache window has expired.

All fetch-related logging (start, success, failure) is handled by FirebaseRemoteConfigService.fetchAndActivate — this task is a pure delegator. A failed fetch is swallowed by the service; the app continues with the defaults or the last successfully fetched values.

Inheritance

Constructors

RemoteConfigSyncTask({required FirebaseRemoteConfigService remoteConfigService})

Properties

hashCode int
The hash code for this object.
no setterinherited
id StartupTaskId
A unique identifier for this task, used for logging and ordering.
no setteroverride
label String
A short human-readable description shown on the splash screen while this task runs.
no setteroverride
phase StartupPhase
The startup phase this task belongs to.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

execute({void onSubProgress(double subFraction)?}) Future<void>
Performs the startup work for this task.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited