Abstract backend contract for all flag / remote-config providers.
Implementations must supply typed accessors and lifecycle methods. FlagService delegates all reads through this interface, so providers are interchangeable (Firebase, MongoDB, local map, cached wrapper, etc.).
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastFetchedAt → DateTime?
-
The UTC time of the last successful fetch, or
nullif never fetched.no setter - providerId → String
-
A stable identifier for this provider (e.g.
'firebase','mongo').no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getBool(
String key, {required bool defaultValue}) → bool - Returns a boolean flag value.
-
getDouble(
String key, {required double defaultValue}) → double - Returns a double flag value.
-
getInt(
String key, {required int defaultValue}) → int - Returns an integer flag value.
-
getJson(
String key, {required Map< String, dynamic> defaultValue}) → Map<String, dynamic> - Returns a JSON object flag value.
-
getString(
String key, {required String defaultValue}) → String - Returns a string flag value.
-
getValue<
T> (String key, T defaultValue) → T -
Returns the value for
key, falling back todefaultValueif the key does not exist or has an incompatible type. -
initialize(
) → Future< void> - Initialises the provider (e.g. fetch + activate remote config).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → Future< void> - Requests a fresh value set from the remote source.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited