SharedPreferenceWithCacheExt extension

Contains extensions to read and write a value in SharedPreferencesWithCache

on
  • SharedPreferencesWithCache

Methods

getBoolOrElse(String key, {required bool defaultValue}) bool

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getColor(String key) Color?

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getColorOrElse(String key, {required Color defaultValue}) Color

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getDateTime(String key) DateTime?

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getDateTimeOrElse(String key, {required DateTime defaultValue}) DateTime

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getDoubleOrElse(String key, {required double defaultValue}) double

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getIntOrElse(String key, {required int defaultValue}) int

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getJson(String key) Map<String, dynamic>?

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getJsonOrElse(String key, {required Map<String, dynamic> defaultValue}) Map<String, dynamic>

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getOrElse<T extends Object>(String key, {required T defaultValue}) → T

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

Reads a value, throwing an exception if it's not a double, int, string, bool or List<String>.
getStringListOrElse(String key, {required List<String> defaultValue}) List<String>

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getStringOrElse(String key, {required String defaultValue}) String

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getThemeMode(String key) ThemeMode?

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getThemeModeOrElse(String key, {required ThemeMode defaultValue}) ThemeMode

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

getValue<T extends Object>(String key) → T?

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

Reads a value, throwing an exception if it's not a double, int, string, bool or List<String>.
setColor(String key, Color color) Future<void>

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

setDateTime(String key, DateTime dateTime) Future<void>

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

Stores values as timezone independent milliseconds from the standard Unix epoch.
setJson(String key, Map<String, dynamic> map) Future<void>

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

setThemeMode(String key, ThemeMode themeMode) Future<void>

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

setValue<T extends Object>(String key, T value) Future<void>

Available on SharedPreferencesWithCache, provided by the SharedPreferenceWithCacheExt extension

Writes a value, throwing an exception if it's not a double, int, string, bool or List<String>.