RemoteSettingsService class
Manages remote settings: fetching, caching, local overrides, and change notification.
Constructors
- RemoteSettingsService({required RemoteSettingsConfig config})
Properties
- config → RemoteSettingsConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onSettingsChanged
→ Stream<
Map< String, RemoteSetting> > -
Stream that fires whenever the remote settings change after a fetch.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applySettings(
Map< String, RemoteSetting> settings) → void - Merge a map of settings into the local config (e.g. from a push notification).
-
clearCache(
) → Future< void> - Clear the in-memory and on-disk cache.
-
diff(
) → List< RemoteVsLocal> - Compare remote settings against local overrides.
-
dispose(
) → void - Release resources.
-
exportEffective(
) → Map< String, dynamic> - Export all effective (resolved) settings as a flat map.
-
fetchSettings(
{bool force = false}) → Future< Map< String, RemoteSetting> > - Fetch settings from the remote endpoint.
-
get<
T> (String key) → T? -
Get a typed setting value. Returns
nullif not found. -
getEffective(
String key) → SettingValue - Get the effective value with full source information.
-
isOverridden(
String key) → bool -
Whether
keyhas a local override. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeLocalOverride(
String key) → void - Remove a local override, reverting to the remote value.
-
setLocalOverride(
String key, dynamic value) → void -
Set a local override for
key. The override takes precedence over the remote value until removed. -
startAutoRefresh(
[Duration? interval]) → void - Start periodic background refresh.
-
stopAutoRefresh(
) → void - Stop periodic refresh.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited