PreferencesManager class

Manager for preferences and remote config

Constructors

PreferencesManager()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Methods

clearAll() → Future<bool>
Clear all stored preferences.
getBoolean(String key, [bool defaultValue = false]) → bool
Get a boolean value by key
getJson<T>(String key, T fromJson(Map<String, dynamic>)) → T?
Parse a JSON object value.
getJsonList<T>(String key, T fromJson(Map<String, dynamic>)) → List<T>
Parse a JSON list value.
getString(String key, [String defaultValue = '']) → String
Get a string value by key
getStringList(String key) → List<String>
Get a string list value by key
getValue(String key) → String
Convenience getter for JSON/string values.
initialize() → Future<void>
Initialize the preferences manager
isInitialized() → bool
Check if preferences manager is initialized
setBoolean(String key, bool value) → Future<bool>
Set a boolean value
setJson(String key, Map<String, dynamic> value) → Future<bool>
Set a JSON object value.
setString(String key, String value) → Future<bool>
Set a string value
setStringList(String key, List<String> value) → Future<bool>
Set a string list value
setValue(String key, String value) → Future<bool>
Convenience setter for JSON/string values.