SharedPreference class
shared preference for storing app data locally
Constructors
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
-
getBusinessConfig(
) → BusinessAppConfigModel? - to get business config model
-
getLocale(
) → String - to get previously selected local language
-
getUser(
) → UserModel? - to get user model
-
init(
) → Future< SharedPreferences?> - initializing shared preference instance on app run
-
isLogin(
) → bool - to get user login status
-
setBusinessConfig(
BusinessAppConfigModel? businessAppConfigModel) → Future< bool> - to set business config model
-
setIsLogin(
bool value) → Future< bool> - to set user login status
-
setLocale(
String languageCode) → Future< bool> - to set selected local language
-
setUser(
{UserModel? userModel}) → Future< bool> - to set user model