Prefs class abstract

ease handling shared preferences

Constructors

Prefs()

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

clear() Future<void>
clear the share preferences TODO ::: safe attributes ! IT WILL EFFECT QUEEN PACAKAGES ALSON LIKE ! REMOVE USED THEME NUMBER AND SELECTED LOCALE
getBoolOr(String key, bool def) bool
getBoolOrFalse(String key) bool
getBoolOrNull(String key) bool?
return bool by key if exist return True else false
getBoolOrTrue(String key) bool
getDateOrNow(String key) DateTime
getDateOrNull(String key) DateTime?
getIntOr(String key, int def) int
return int if exists else return def
getIntOrNull(String key) int?
return int by key else return null
getIntOrZero(String key) int
getMap(String key) Map<String, dynamic>
getStringOr(String key, String def) String?
return String by key if exists else return def value
getStringOrEmpty(String key) String
return String by key if exists else return '' (Empty String)
getStringOrNull(String key) String?
return String by key if exists else return null
remove(String key) Future<void>
remove specially key that you want share preferences
removeMany(List<String> keys) Future<void>
setBool(String key, bool value) Future<void>
setDate(String key, DateTime value) Future<void>
setInt(String key, int value) Future<void>
setMap(String key, Map<String, dynamic> map) Future<void>
return Map by given key or value
setString(String key, String value) Future<void>
set the value to given key in shared prefs
setStringToEmpty(String key) Future<void>
set the value to given key to '' (Empty String)