TGSharedPreferences class

TGFramework's Shared Preferences implementation

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

addListener(TGSharedPreferencesListener? listener) → void
Add listener
createdAt() DateTime?
TGSharedPreferences created at
get(String key) Future
Gets content for given key
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() Future<void>
Reloads Shared Preference
remove(String key) Future<bool>
Removes content for given key
removeAllListeners() → void
Remove all listeners
removeListener(TGSharedPreferencesListener? listener) → void
Remove listener
set(String key, dynamic value, {Duration? validFor}) Future<bool>
Sets content for given key with Duration
toString() String
A string representation of this object.
inherited
validSince() Duration
Number of milliseconds passed since valid TGSharedPreferences has been created

Operators

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

Static Methods

getInstance() TGSharedPreferences
Gets TGSharedPreferences' instance reference